@@ -1373,7 +1373,22 @@ func TestRegistryModulesReadTerraformRegistryModule(t *testing.T) {
1373
1373
r .NoError (err )
1374
1374
r .NotNil (tfm )
1375
1375
r .Equal (fmt .Sprintf ("%s/%s/%s/%s" , orgTest .Name , rm .Name , rm .Provider , version ), tfm .ID )
1376
+ r .Equal (rm .Name , tfm .Name )
1377
+ r .Equal ("A test Terraform module for use in CI pipelines" , tfm .Description )
1378
+ r .Equal (rm .Provider , tfm .Provider )
1379
+ r .Equal (rm .Namespace , tfm .Namespace )
1376
1380
r .Equal (version , tfm .Version )
1381
+ r .Equal ("" , tfm .Tag )
1382
+ r .Equal (0 , tfm .Downloads )
1383
+ r .False (tfm .Verified )
1384
+ r .NotNil (tfm .Root )
1385
+ r .Equal (rm .Name , tfm .Root .Name )
1386
+ r .Equal ("" , tfm .Root .Readme )
1387
+ r .False (tfm .Root .Empty )
1388
+ r .Len (tfm .Root .Inputs , 1 )
1389
+ r .Len (tfm .Root .Outputs , 1 )
1390
+ r .Len (tfm .Root .ProviderDependencies , 1 )
1391
+ r .Len (tfm .Root .Resources , 1 )
1377
1392
})
1378
1393
1379
1394
t .Run ("fetch module from public registry" , func (t * testing.T ) {
@@ -1410,7 +1425,22 @@ func TestRegistryModulesReadTerraformRegistryModule(t *testing.T) {
1410
1425
r .NoError (err )
1411
1426
r .NotNil (tfm )
1412
1427
r .Equal (fmt .Sprintf ("%s/%s/%s/%s" , orgTest .Name , rm .Name , rm .Provider , version ), tfm .ID )
1428
+ r .Equal (rm .Name , tfm .Name )
1429
+ r .Equal ("A test Terraform module for use in CI pipelines" , tfm .Description )
1430
+ r .Equal (rm .Provider , tfm .Provider )
1431
+ r .Equal (rm .Namespace , tfm .Namespace )
1413
1432
r .Equal (version , tfm .Version )
1433
+ r .Equal ("" , tfm .Tag )
1434
+ r .Equal (0 , tfm .Downloads )
1435
+ r .False (tfm .Verified )
1436
+ r .NotNil (tfm .Root )
1437
+ r .Equal (rm .Name , tfm .Root .Name )
1438
+ r .Equal ("" , tfm .Root .Readme )
1439
+ r .False (tfm .Root .Empty )
1440
+ r .Len (tfm .Root .Inputs , 1 )
1441
+ r .Len (tfm .Root .Outputs , 1 )
1442
+ r .Len (tfm .Root .ProviderDependencies , 1 )
1443
+ r .Len (tfm .Root .Resources , 1 )
1414
1444
})
1415
1445
}
1416
1446
0 commit comments