I’m going with yes it was a test and yes you passed, based on the symbolism (which I agree was about authority and testing your mettle). Belial did something similar with me, and has confirmed it was him, not “just” a dream: Rosier goetic ritual - #9 by Lady_Eva
Edit to add, “that which is within is like that which is without” is a common theme in magick, so that interpretation @lawclerk posted can also fit very well. I know that’s annoying, blurred boundaries about what’s “real” (meaning external) and what originates with you, but I have found these things to be true.
I can almost guarantee that if I have a dream about a spirit or theme, people on this forum will be talking about them when I next log-in or I will have a run of PMs for whom the spirit is the answer to questions. Things that that tip some people over the edge.
I tried to cover some of that in this topic: Common Experiences Among Magicians