def test_quota_volume_gigabytes(self):
        # NOTE(gfidente): quota set needs to be changed for this test
        # or we may be limited by the volumes or snaps quota number, not by
        # actual gigs usage; next line ensures shared set is restored.
        self.addCleanup(self.quotas_client.update_quota_set,
                        self.demo_tenant_id,
                        **self.shared_quota_set)

        new_quota_set = {'gigabytes': 2, 'volumes': 2, 'snapshots': 1}
        resp, quota_set = self.quotas_client.update_quota_set(
            self.demo_tenant_id,
            **new_quota_set)
        self.assertRaises(exceptions.OverLimit,
                          self.volumes_client.create_volume,
                          size=1)

        new_quota_set = {'gigabytes': 2, 'volumes': 1, 'snapshots': 2}
        resp, quota_set = self.quotas_client.update_quota_set(
            self.demo_tenant_id,
            **self.shared_quota_set)
        self.assertRaises(exceptions.OverLimit,
                          self.snapshots_client.create_snapshot,
                          self.volume['id'])