File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -34,3 +34,30 @@ func TestExpectKnownValue(t *testing.T) {
3434 },
3535 })
3636}
37+
38+ // Let's add a test case that checks the failure scenario when the value is incorrect.
39+ func TestExpectKnownValue_ValueIncorrect (t * testing.T ) {
40+ t .Parallel ()
41+
42+ r .UnitTest (t , r.TestCase {
43+ TerraformVersionChecks : []tfversion.TerraformVersionCheck {
44+ tfversion .SkipBelow (tfversion .Version1_14_0 ),
45+ },
46+ ProtoV6ProviderFactories : map [string ]func () (tfprotov6.ProviderServer , error ){
47+ "examplecloud" : providerserver .NewProviderServer (testprovider.Provider {
48+ ListResources : map [string ]testprovider.ListResource {
49+
50+ // TODO: define a simpler resource and list resource here or copy the `examplecloud_test.go` and `examplecloud_list_resource.go` files here for use
51+
52+ //"examplecloud_containerette": examplecloudListResource(),
53+ },
54+ Resources : map [string ]testprovider.Resource {
55+ //"examplecloud_containerette": examplecloudResource(),
56+ },
57+ }),
58+ },
59+ Steps : []r.TestStep {
60+ // TODO
61+ },
62+ })
63+ }
You can’t perform that action at this time.
0 commit comments