Bayesian Test in hypothesis testing with Bernoulli random variables Let $X_1,\ldots , X_n$ be iid Bernoulli$(p)$ $(0<p<1)$. Our sample is $x_1=\ldots x_n=1$. Suppose that the prior distribution of $p$ is Uniform$(0,1)$. Consider a Bayesian test for $H_0: p\geq 0.9$ vs $H_1: p<0.9$. Find a necessary and sufficient condition on $n$ that $H_0$ is rejected.
I figured out that the posterior distribution of $p|(x_1=\ldots=x_n=1)$ is Beta$(n+1,1)$, and I know that $H_0$ will be rejected when
$$P(p\geq 0.9|x_1=\ldots=x_n=1)< P(p< 0.9|x_1=\ldots=x_n=1),$$ but then I am not sure how to express $P(p\geq 0.9|x_1=\ldots=x_n=1)$ in terms of $n$ to get the desired condition. Could you please help me with this? I would really appreciate any help!

Fair warning: I've not checked whether you're right about the form of the posterior.
If the posterior is a known closed form, then the inequality in the hypothesis test amounts to comparing the total density of the expressions on either side. For the LHS that is the proportion of the $ \text{Beta}(n+1,1) $ distribution that is greater than or equal to 0.9. You can calculate this analytically using the CDF, which is conveniently available for a closed form distribution, eg on wikipedia.
Since the $\text{RHS} = 1 - \text{LHS}$, you can skip calculating the RHS and just see if $\text{LHS}\geq 0.5$.
