Skip to content

Commit

Permalink
Fix yql test (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwell authored Dec 18, 2024
1 parent 357d9d1 commit 04391f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 2 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,8 @@ _Appears in:_
| `WaitingForOpArchiveUpdate` | |
| `WaitingForQTStateUpdatingPrepare` | |
| `WaitingForQTStateUpdate` | |
| `WaitingForYqlaUpdatingPrepare` | |
| `WaitingForYqlaUpdate` | |
| `WaitingForSafeModeDisabled` | |


Expand Down
2 changes: 1 addition & 1 deletion pkg/components/yql_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func NewYQLAgent(cfgen *ytconfig.Generator, ytsaurus *apiproxy.Ytsaurus, master
getNodeSelectorWithDefault(resource.Spec.YQLAgents.NodeSelector, resource.Spec.NodeSelector),
),
updateEnvironment: NewInitJob(
&l,
l,
ytsaurus.APIProxy(),
ytsaurus,
resource.Spec.ImagePullSecrets,
Expand Down
17 changes: 4 additions & 13 deletions test/e2e/ytsaurus_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,23 +600,14 @@ var _ = Describe("Basic e2e test for Ytsaurus controller", Label("e2e"), func()
}) // update query-tracker

Context("With yql agent", Label("yql-agent"), func() {

It("Should run with yql agent and check that yql agent channel options set up correctly", Label("basic"), func(ctx context.Context) {
By("Creating a Ytsaurus resource")

namespace := "yqlagentchannel"

ytsaurus := testutil.CreateBaseYtsaurusResource(namespace)
BeforeEach(func() {
ytsaurus = testutil.WithQueryTracker(ytsaurus)
ytsaurus = testutil.WithYqlAgent(ytsaurus)
})

g := ytconfig.NewGenerator(ytsaurus, "local")

DeferCleanup(deleteYtsaurus, ytsaurus)
runYtsaurus(ytsaurus)

It("Should run with yql agent and check that yql agent channel options set up correctly", Label("basic"), func(ctx context.Context) {
By("Creating ytsaurus client")
ytClient := getYtClient(g, namespace)
ytClient := createYtsaurusClient(ytsaurus, namespace)

By("Check that yql agent channel exists in cluster_connection")
Expect(ytClient.NodeExists(ctx, ypath.Path("//sys/@cluster_connection/yql_agent/stages/production/channel"), nil)).Should(BeTrue())
Expand Down

0 comments on commit 04391f7

Please sign in to comment.