test: fix various routes tests

* system/disks routes is gone
* provision routes now return 405 instead of 409 when re-setup/re-activated
This commit is contained in:
Girish Ramakrishnan
2024-06-03 19:18:36 +02:00
parent db7e88e302
commit 3dcd0975f7
4 changed files with 9 additions and 21 deletions
+4 -4
View File
@@ -216,20 +216,20 @@ describe('Provision', function () {
expect(response.body.token).to.be.a('string');
});
it('fails the second time', async function () {
it('activate fails the second time', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/provision/activate`)
.send({ username: owner.username, password: owner.password, email: owner.email, displayName: owner.displayName })
.ok(() => true);
expect(response.statusCode).to.eql(409);
expect(response.statusCode).to.eql(405); // route unavailable post activation
});
it('after fails', async function () {
it('seutp fails after activation', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/provision/setup`)
.send({ domainConfig: { provider: 'noop', domain: DOMAIN, adminFqdn: 'my.' + DOMAIN, config: {}, tlsConfig: { provider: 'fallback' } } })
.ok(() => true);
expect(response.statusCode).to.eql(409);
expect(response.statusCode).to.eql(405);
});
it('device left first time mode', async function () {