def test_s3rver(self): port = 4569 self.useFixture(s3rver.S3rverDriver(port=port)) self.assertEqual("s3://localhost:%d" % port, os.getenv("PIFPAF_URL")) self.assertEqual("http://localhost:%d" % port, os.getenv("PIFPAF_HTTP_URL"))
def test_gnocchi_with_existing_s3rver(self): s3 = self.useFixture(s3rver.S3rverDriver(port=4569)) port = gnocchi.GnocchiDriver.DEFAULT_PORT + 12 self.useFixture(gnocchi.GnocchiDriver( storage_url="s3://gnocchi:pass@localhost:%d" % s3.port, port=port)) self.assertEqual("gnocchi://localhost:%d" % port, os.getenv("PIFPAF_URL")) r = requests.get("http://localhost:%d/" % port) self.assertEqual(200, r.status_code)