I am struggling to understand the limiting assumptions of simple hypothesis testing using Z and T statistics under different scenarios.
In a case where X is normally distributed, and n > 30, and $\sigma^2$ is known, it is obvious a Z-test is appropriate. In the same scenario, if n < 30, a Z test is still appropriate, because we don't need to rely on CLT for a normal distribution of the sample mean and $\sigma^2$ is known.
However, in a case where X is normally distributed, n < 30, and $\sigma^2$ is not known, should I use a t-test or an approximate Z-test, substituting $\sigma$ for s, because the data are still normal? Or is the fact that n < 30 enough to warrant switching to a t-test, because s is not a good estimator of $\sigma$ for small samples normal or not?
Similarly, suppose X is not normally distributed, but n > 30, and $\sigma^2$ is not known. It seems we can still use an approximate Z-test because CLT implies that the distribution of the sample mean will be normal?
So is the only situation that I would resort to a t-test (for a single sample) one in which $\sigma^2$ is unknown, and n< 30?