״אִם רָאֹה תִרְאֶה״, אָמַר רַבִּי אֶלְעָזָר: אָמְרָה חַנָּה לִפְנֵי הַקָּדוֹשׁ בָּרוּךְ הוּא: רִבּוֹנוֹ שֶׁל עוֹלָם, ״אִם רָאֹה״ — מוּטָב, וְאִם לָאו — ״תִּרְאֶה״ אֵלֵךְ וְאֶסְתַּתֵּר בִּפְנֵי אֶלְקָנָה בַּעֲלִי, וְכֵיוָן דְּמִסְתַּתַּרְנָא מַשְׁקוּ לִי מֵי סוֹטָה, וְאִי אַתָּה עוֹשֶׂה תּוֹרָתְךָ פְּלַסְתֵּר, שֶׁנֶּאֱמַר ״וְנִקְּתָה וְנִזְרְעָה זָרַע״.
"If You see, You will see" – R' Elazar said: Chanah said before Hashem, "Master of the world! 'If You see,' good, and if not, 'You will see' – I will go and seclude myself before my husband Elkanah, and since I'm secluded they will have me drink the Sotah waters, and You will not make Your Torah a forgery, as it says, 'She will be clean and will bear children.'"
(This story also appears very similarly in Pesikta Rabbasi §43.)
The way Chanah phrases her claim seems to indicate that she's not planning on letting Elkanah know what she's planning and why; the idea is simply that Elkanah will warn her and have her drink.
Suppose Chanah were to tell Elkanah ahead of time that she plans to seclude herself and not sin such that she will drink and receive the berachos of the Sotah waters. If Elkanah were to warn her, knowing her plan and knowing that she's not sinning, would they still have her drink?