Beispiel #1
0
    def test_changed(self):
        prev_version = self.host.config_version
        self.host.bump_config()
        request_data = {'version': prev_version}

        ret_get = self.client.get(self.url, request_data, **self.auth_headers)
        self.assertEqual(ret_get.status_code, 200)
        utils.check_tarball_host(self, ret_get, self.host)

        ret_head = self.client.head(self.url, request_data,
                                    **self.auth_headers)
        self.assertEqual(ret_head.status_code, 200)
Beispiel #2
0
 def test_get(self):
     # in the fixture, the host for 17-ffaa:0:1107 has extra services
     hosts = Host.objects.filter(AS__as_id='ffaa:0:1107')
     host = hosts[0]
     resp = self.client.get(self._get_url(host), {},
                            **self._get_auth_headers(host))
     self.assertEqual(resp.status_code, 200)
     utils.check_tarball_host(self, resp, host)
     utils.check_tarball_files_exist(self, resp, [
         'gen/ISD17/ASffaa_0_1107/bw17-ffaa_0_1107-1/supervisord.conf',
         'gen/ISD17/ASffaa_0_1107/pp17-ffaa_0_1107-1/supervisord.conf'
     ])
Beispiel #3
0
 def test_get(self):
     # in the fixture, the host for 17-ffaa:0:1107 has extra services
     hosts = Host.objects.filter(AS__as_id='ffaa:0:1107')
     host = hosts[0]
     resp = self.client.get(self._get_url(host), {},
                            **self._get_auth_headers(host))
     self.assertEqual(resp.status_code, 200)
     tar = utils.check_tarball_host(self, resp, host)
     services = json.loads(utils.tar_cat(
         tar, 'scionlab-config.json'))['systemd_units']
     self.assertIn('scion-bwtestserver.service', services)
Beispiel #4
0
 def test_get(self):
     # in the fixture, the host for 17-ffaa:0:1107 has extra services
     hosts = Host.objects.filter(AS__as_id='ffaa:0:1107')
     host = hosts[0]
     resp = self.client.get(self._get_url(host), {},
                            **self._get_auth_headers(host))
     self.assertEqual(resp.status_code, 200)
     tar = utils.check_tarball_host(self, resp, host)
     services = utils.tar_cat(tar,
                              'scionlab-services.txt').decode().split('\n')
     self.assertTrue('scion-bwtestserver.service' in services)