Skip to content

Commit

Permalink
Merge pull request #58 from cobbler/feature/adjust-map-types
Browse files Browse the repository at this point in the history
Adjust map types
  • Loading branch information
SchoolGuy committed Aug 16, 2024
2 parents 0200f10 + 9773df3 commit caa2583
Show file tree
Hide file tree
Showing 7 changed files with 1,490 additions and 54 deletions.
10 changes: 10 additions & 0 deletions file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ func TestGetFileHandle(t *testing.T) {
}
}

func TestGetFileAsRendered(t *testing.T) {
c := createStubHTTPClient(t, "get-file-as-rendered-req.xml", "get-file-as-rendered-res.xml")
res, err := c.GetFileAsRendered("testfile")
utils.FailOnError(t, err)

if res["name"] != "testfile" {
t.Error("Wrong object name returned.")
}
}

/*
* NOTE: We're skipping the testing of CREATE, UPDATE, DELETE methods for now because
* the current implementation of the StubHTTPClient does not allow
Expand Down
16 changes: 16 additions & 0 deletions fixtures/get-file-as-rendered-req.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>get_file_as_rendered</methodName>
<params>
<param>
<value>
<string>testfile</string>
</value>
</param>
<param>
<value>
<string>securetoken99</string>
</value>
</param>
</params>
</methodCall>
Loading

0 comments on commit caa2583

Please sign in to comment.