Let $X_1,...,X_n$ be a random sample of size $n$ from a shifted exponential distribution, that is $X_i\sim \mathrm{EXP}(1,\eta)\implies E(X_i)=1+\eta$. A test of $H_0:\eta\le\eta_0$ versus $H_a:\eta > \eta_0$ is desired, based on $X_{(1)}$ (the minimum order statistic).
Find a critical region of size $\alpha$ of the form {$x_{(1)}\ge c$}, use this to derive the power function for the test of {$x_{(1)}\ge c$}, and finally calculate the sample size $n$ for a test of size $\alpha$ if the alternative is true given that the probability of type $2$ error is $\beta$.
I know that I can find a pivotal quantity $X_{(1)}-\eta$ since it can easily be shown that $X_{(1)}\sim \mathrm{EXP}(1/n,0)$. Further, it is easy to simply calculate the integrals and inverse CDF to find the percentile function of this distribution. My problem is not with that stuff but understanding how I need to use that in order to answer these questions.
Based on my understanding, I have calculated that we would reject $H_0$ if $X_{(1)}\ge\eta_0-\ln(\alpha)/n$, which implies that if the alternative is actually true, the power of the test would be $\exp(-n(\eta_0-\ln(\alpha)/n-\eta\alpha))$ (I spare you the calculations); however, I honestly do not know if this is the right way to do it since the null hypothesis would also be true if $\eta$ took some value smaller than $\eta_0$. Further, from here, I am not sure how to calculate the necessary sample size.
How do you do this problem properly?
First, the critical region of size $α$ is indeed $\left\{ X_{(1)} \geqslant η_0 - \dfrac{1}{n} \ln α \right\}$. Be definition,$$ α = \sup_{η \leqslant η_0} P_η(X_{(1)} \geqslant c) = P_{η_0}(X_{(1)} \geqslant c), $$ and it has been calculated that $c_0 = η_0 - \dfrac{1}{n} \ln α$ satisfies $P_{η_0}(X_{(1)} \geqslant c_0) = α$.
Next, the calculated power of the test is incorrect. For $η_0 < η \leqslant η_0 - \dfrac{1}{n} \ln α$,$$ P_η\left( X_{(1)} \geqslant η_0 - \dfrac{1}{n} \ln α \right) = \exp\left( -n\left( η_0 - \dfrac{1}{n} \ln α - η \right) \right), $$ and for $η > η_0 - \dfrac{1}{n} \ln α$,$$ P_η\left( X_{(1)} \geqslant η_0 - \dfrac{1}{n} \ln α \right) = 1. $$
Finally, when $H_a: η > η_0$ is true, because the probability of Type 2 error is given to be $β$, then$$ \exp\left( -n\left( η_0 - \dfrac{1}{n} \ln α - η \right) \right) = 1 - β\\ \Longrightarrow η_0 - \dfrac{1}{n} \ln α - η = -\frac{1}{n} \ln(1 - β) \Longrightarrow n = \frac{\ln(1 - β) - \ln α}{η - η_0}. $$