Be $\mathbf X:=(X_1,..,X_n)$ a $n$-dimensional sample of Gaussian rvs with known population variance $\sigma^2$, but with unknown population mean $\mu$. I test the rejection of $H_0$ in favor of $H_1$:
$H_0$: $\mu=\mu_0$ vs. $H_1$: $\mu=\mu_1$. The values $\mu_0$ and $\mu_1$ don't matter for now.
I will indicate the sample mean with $\bar X$.
- I compute the likelihood ratio $LR$ for a Gaussian sample to determine the rejection region: $$LR=\exp\left[\frac 1{2\sigma^2}\sum_{i=1}^n\left((X_i-\mu_0)^2-(X_i-\mu_1)^2\right)\right]$$
- Set the rejection region $\mathcal R:=\{(X_1,..,X_n):LR>\tilde c\}=\{(X_1,..,X_n):\bar X>c\}$, with $c:=\frac{\sigma^2}{n(\mu_1-\mu_0)}\log \tilde c+\frac{\mu_0+\mu_1}2$, in example if $\mu_0<\mu_1$, or switching some signs otherwise.
- Set a test level $\alpha$ to delimitate the rejection region (use that the sample is Gaussian): $$\mathbb P\left(\left.\bar X>c\right|\mu=\mu_0\right)=\alpha\Rightarrow c=\mu_0+\frac\sigma{\sqrt n}q_{1-\alpha},$$ where $q_{1-\alpha}$ is the quantile of the normal distribution of level $1-\alpha$.
- Now I compute the p-value $\pi_0$ associated to these data with sample mean $\bar X$ as the lowest level $\alpha$ so that the data lie in the rejection region: $$\pi_0:=\inf\{\alpha:\bar X>c\}=1-\Phi\left[\frac{\sqrt n}\sigma\left(\bar X-\mu_0\right)\right].$$
After the corrections, I came up with almost an answer, but one question mark is still open to me:
Why is the rejection region independent from $H_1$?
EDIT
Many computations were wrong, and now everything seems much more understandable, thanks to the answer below, that showed me with numbers what is under the hood.