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!