public ClusterTestsFixture()
        {
            ProjectId = _projectId;
            RegionId  = _regionId;
            GKEName   = _gkeName;

            Assert.False(string.IsNullOrEmpty(GKEName));
            Assert.False(string.IsNullOrEmpty(ProjectId));

            ClusterId = _clusterId + TestUtil.RandomName();
            RealmId   = _realmId + TestUtil.RandomName();
            RegionId  = _regionId;

            string parent = $"projects/{_projectId}/locations/{RegionId}/realms/{RealmId}";

            ClusterName = $"{parent}/gameServerClusters/{ClusterId}";

            // Setup
            var createRealmUtils = new CreateRealmSamples();

            createRealmUtils.CreateRealm(_projectId, _regionId, RealmId);

            var createClusterUtils  = new CreateClusterSamples();
            var clusterCreateOutput = createClusterUtils.CreateGameServerCluster(ProjectId, RegionId, RealmId, ClusterId, GKEName);

            Assert.Contains($"Game server cluster created: {ClusterName}", clusterCreateOutput);
        }
Example #2
0
        public RealmsTestsFixture()
        {
            ProjectId = _projectId;
            Assert.False(string.IsNullOrEmpty(ProjectId));

            RegionId  = _regionId;
            RealmId   = _realmId + TestUtil.RandomName();
            RealmName = $"projects/{ProjectId}/locations/{RegionId}/realms/{RealmId}";

            // Setup (realm creation test)
            var    createRealmUtils  = new CreateRealmSamples();
            string createRealmOutput = createRealmUtils.CreateRealm(ProjectId, RegionId, RealmId);

            Assert.Contains($"Realm created for {RealmName}", createRealmOutput);
        }