@@ -834,20 +834,6 @@ func TestCloud_resolveCloudConfig(t *testing.T) {
834834 },
835835 },
836836 },
837- "with no organization attribute or env var" : {
838- config : cty .ObjectVal (map [string ]cty.Value {
839- "organization" : cty .NullVal (cty .String ),
840- "hostname" : cty .NullVal (cty .String ),
841- "token" : cty .NullVal (cty .String ),
842- "workspaces" : cty .ObjectVal (map [string ]cty.Value {
843- "name" : cty .StringVal ("prod" ),
844- "tags" : cty .NullVal (cty .Set (cty .String )),
845- "project" : cty .NullVal (cty .String ),
846- }),
847- }),
848- vars : map [string ]string {},
849- expectedErr : `Invalid or missing required argument: "organization" must be set in the cloud configuration or as an environment variable: TF_CLOUD_ORGANIZATION.` ,
850- },
851837 "null workspace, TF_WORKSPACE present" : {
852838 config : cty .ObjectVal (map [string ]cty.Value {
853839 "organization" : cty .StringVal ("hashicorp" ),
@@ -965,28 +951,6 @@ func TestCloud_resolveCloudConfig(t *testing.T) {
965951 },
966952 },
967953 },
968-
969- // TODO: fix expectations from setConfigurationFields cases
970- "with hostname set" : {
971- config : cty .ObjectVal (map [string ]cty.Value {
972- "organization" : cty .StringVal ("hashicorp" ),
973- "hostname" : cty .StringVal ("hashicorp.com" ),
974- "token" : cty .NullVal (cty .String ),
975- "workspaces" : cty .ObjectVal (map [string ]cty.Value {
976- "name" : cty .StringVal ("prod" ),
977- "tags" : cty .NullVal (cty .Set (cty .String )),
978- "project" : cty .NullVal (cty .String ),
979- }),
980- }),
981- expectedResult : cloudConfig {
982- hostname : "hashicorp.com" ,
983- organization : "hashicorp" ,
984- token : "" ,
985- workspaceMapping : WorkspaceMapping {
986- Name : "prod" ,
987- },
988- },
989- },
990954 "with hostname not set, set to default hostname" : {
991955 config : cty .ObjectVal (map [string ]cty.Value {
992956 "organization" : cty .StringVal ("hashicorp" ),
@@ -1007,26 +971,6 @@ func TestCloud_resolveCloudConfig(t *testing.T) {
1007971 },
1008972 },
1009973 },
1010- "with workspace name set" : {
1011- config : cty .ObjectVal (map [string ]cty.Value {
1012- "organization" : cty .StringVal ("hashicorp" ),
1013- "hostname" : cty .StringVal ("hashicorp.com" ),
1014- "token" : cty .NullVal (cty .String ),
1015- "workspaces" : cty .ObjectVal (map [string ]cty.Value {
1016- "name" : cty .StringVal ("prod" ),
1017- "tags" : cty .NullVal (cty .Set (cty .String )),
1018- "project" : cty .NullVal (cty .String ),
1019- }),
1020- }),
1021- expectedResult : cloudConfig {
1022- hostname : "hashicorp.com" ,
1023- organization : "hashicorp" ,
1024- token : "" ,
1025- workspaceMapping : WorkspaceMapping {
1026- Name : "prod" ,
1027- },
1028- },
1029- },
1030974 "with workspace tags set" : {
1031975 config : cty .ObjectVal (map [string ]cty.Value {
1032976 "organization" : cty .StringVal ("hashicorp" ),
@@ -1052,27 +996,6 @@ func TestCloud_resolveCloudConfig(t *testing.T) {
1052996 },
1053997 },
1054998 },
1055- "with project name set" : {
1056- config : cty .ObjectVal (map [string ]cty.Value {
1057- "organization" : cty .StringVal ("hashicorp" ),
1058- "hostname" : cty .StringVal ("hashicorp.com" ),
1059- "token" : cty .NullVal (cty .String ),
1060- "workspaces" : cty .ObjectVal (map [string ]cty.Value {
1061- "name" : cty .StringVal ("prod" ),
1062- "tags" : cty .NullVal (cty .Set (cty .String )),
1063- "project" : cty .StringVal ("my-project" ),
1064- }),
1065- }),
1066- expectedResult : cloudConfig {
1067- hostname : "hashicorp.com" ,
1068- organization : "hashicorp" ,
1069- token : "" ,
1070- workspaceMapping : WorkspaceMapping {
1071- Name : "prod" ,
1072- Project : "my-project" ,
1073- },
1074- },
1075- },
1076999 }
10771000
10781001 for name , tc := range cases {
0 commit comments