Yeah you cannot just use any metal cylinder.
Your typical shotgun operates at over 11,000 PSI.
The larger the bore the more surface area that pressure operates against as well, and more mechanical energy it applies to both the breach and the projectile.
On top of that you don't build a gun to just barely handle the intended pressure, you must design it with some room for error.
Proof loads for many commercial guns can be anywhere from 15-30%+ over intended operating pressures. And some guns can take a proof load as high as 200+% over intended operating pressure.
The gun may not be able to handle that kinda load for long, metal fatigue and such, but it insures that the gun will be robust enough to deal with slight real life variations of pressure. From variables such as mist or moisture in the barrel reduce volume and creating steam, to powder variations or minor inconsistencies, primer inconsistencies, fouling in the form of metal taking up space in the barrel. Minor degradation over time, perhaps minor internal rust, dings and scratches on the gun, and overall slightly less than original strength over time.
There is so many variables than even the same exact load may have different maximum pressure peaks at different times. Different unknowns can combine to increase pressure beyond what is intended, but still be within a a safe margin of error with a robust gun.
With some margin for error these don't lead to the gun exploding under normal use, unless someone does something extra, like hot rodding cartridges, or firing it with a barrel full of dirt or partially submerged in the water.
With a homemade gun with less worked out load data, and no industry standard you may want to aim for something that can handle a proof load at least 50% above intended operating pressures.
So this means even if you intend to operate at say 12,000 PSI, you should have a gun that has safely fired at at least 150% of that at say 18,000 PSI.
That way at normal operating pressures it will work well over a long period of time, not work for awhile and then blow up in your face one day when you have done nothing differently than before.
Proof loads are remotely fired, like say with a rope while you are behind a concrete barrier, or large dirt berm.