Previous simulations of the one-dimensional Gross-Pitaevskii equation (GPE) with repulsive nonlinearity and a harmonic-oscillator trapping potential hint towards the emergence of quasi-integrable dynamics -- in the sense of quasi-periodic evolution of a moving dark soliton without any signs of ergodicity -- although this model does not belong to the list of integrable equations. To investigate this problem, we replace the full GPE by a suitably truncated expansion over harmonic-oscillator eigenmodes (the Galerkin approximation), which accurately reproduces the full dynamics, and then analyze the systems dynamical spectrum. The analysis enables us to interpret the observed quasi-integrability as the fact that the finite-mode dynamics always produces a quasi-discrete power spectrum, with no visible continuous component, the presence of the latter being a necessary manifestation of ergodicity. This conclusion remains true when a strong random-field component is added to the initial conditions. On the other hand, the same analysis for the GPE in an infinitely deep potential box leads to a clearly continuous power spectrum, typical for ergodic dynamics.