Skip to content

Commit

Permalink
Update tests with master test framework changes
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Apr 25, 2023
1 parent d70d7ee commit 2f86949
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/grpc-js-xds/test/test-nack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as assert from 'assert';
import { register } from "../src";
import { Backend } from "./backend";
import { XdsTestClient } from "./client";
import { FakeCluster, FakeRouteGroup } from "./framework";
import { FakeEdsCluster, FakeRouteGroup } from "./framework";
import { XdsServer } from "./xds-server";

register();
Expand All @@ -38,7 +38,7 @@ describe('Validation errors', () => {
xdsServer?.shutdownServer();
});
it('Should continue to use a valid resource after receiving an invalid EDS update', done => {
const cluster = new FakeCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const cluster = new FakeEdsCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const routeGroup = new FakeRouteGroup('route1', [{cluster: cluster}]);
routeGroup.startAllBackends().then(() => {
xdsServer.setEdsResource(cluster.getEndpointConfig());
Expand Down Expand Up @@ -68,7 +68,7 @@ describe('Validation errors', () => {
}, reason => done(reason));
});
it('Should continue to use a valid resource after receiving an invalid CDS update', done => {
const cluster = new FakeCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const cluster = new FakeEdsCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const routeGroup = new FakeRouteGroup('route1', [{cluster: cluster}]);
routeGroup.startAllBackends().then(() => {
xdsServer.setEdsResource(cluster.getEndpointConfig());
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('Validation errors', () => {
}, reason => done(reason));
});
it('Should continue to use a valid resource after receiving an invalid RDS update', done => {
const cluster = new FakeCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const cluster = new FakeEdsCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const routeGroup = new FakeRouteGroup('route1', [{cluster: cluster}]);
routeGroup.startAllBackends().then(() => {
xdsServer.setEdsResource(cluster.getEndpointConfig());
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('Validation errors', () => {
}, reason => done(reason));
});
it('Should continue to use a valid resource after receiving an invalid LDS update', done => {
const cluster = new FakeCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const cluster = new FakeEdsCluster('cluster1', [{backends: [new Backend()], locality: {region: 'region1'}}]);
const routeGroup = new FakeRouteGroup('route1', [{cluster: cluster}]);
routeGroup.startAllBackends().then(() => {
xdsServer.setEdsResource(cluster.getEndpointConfig());
Expand Down

0 comments on commit 2f86949

Please sign in to comment.