Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
uturunku1 committed Mar 3, 2022
1 parent 0d71a1a commit 9f9d966
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions agent_pool_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ func TestAgentPoolsRead(t *testing.T) {
pool, poolCleanup := createAgentPool(t, client, orgTest)
defer poolCleanup()

wTest, wTestCleanup := createWorkspaceWithVCS(t, client, orgTest, WorkspaceCreateOptions{
Name: String("foo"),
ExecutionMode: String("agent"),
AgentPoolID: String(pool.ID),
})
defer wTestCleanup()

t.Run("when the agent pool exists", func(t *testing.T) {
k, err := client.AgentPools.Read(ctx, pool.ID)
require.NoError(t, err)
Expand All @@ -134,15 +141,13 @@ func TestAgentPoolsRead(t *testing.T) {
})

t.Run("with Include option", func(t *testing.T) {
options := WorkspaceCreateOptions{
Name: String("foo"),
ExecutionMode: String("agent"),
AgentPoolID: String(pool.ID),
}

w, err := client.Workspaces.Create(ctx, orgTest.Name, options)
// w, err := client.Workspaces.Create(ctx, orgTest.Name, WorkspaceCreateOptions{
// Name: String("foo"),
// ExecutionMode: String("agent"),
// AgentPoolID: String(pool.ID),
// })

fmt.Println(w.AgentPoolID)
fmt.Println(wTest.AgentPoolID)

k, err := client.AgentPools.ReadWithOptions(ctx, pool.ID, &AgentPoolReadOptions{
Include: []AgentPoolIncludeOpt{AgentPoolWorkspaces},
Expand Down

0 comments on commit 9f9d966

Please sign in to comment.