Skip to content

Commit

Permalink
tests: schema name must be passed in both places
Browse files Browse the repository at this point in the history
  • Loading branch information
feywind committed Jan 11, 2024
1 parent 9bced70 commit 80e1f28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions samples/system-test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ describe('schema', () => {
const [result] = await schemaClient.commitSchema({
name: schemaName,
schema: {
name: schemaName,
type: typeId,
definition,
},
Expand Down Expand Up @@ -260,7 +261,7 @@ describe('schema', () => {
const output = execSync(
`${commandFor('createTopicWithSchemaRevisions')} ${topicId} ${
schema.id
} BINARY`
} BINARY ${revId} ${revId}`
);
assert.include(output, topicId);
assert.include(output, schema.id);
Expand Down Expand Up @@ -304,9 +305,10 @@ describe('schema', () => {
it('should rollback a schema revision', async () => {
const id = 'rollback_rev';
const schema = await createSchema(id, 'proto');
const committed = await commitSchema(await schema.getName(), 'proto');
const name = await schema.getName();
const committed = await commitSchema(name, 'proto');
const revId = committed.revisionId!;
await commitSchema(await schema.getName(), 'proto');
await commitSchema(name, 'proto');

const output = execSync(
`${commandFor('rollbackSchema')} ${schema.id} ${revId}`
Expand Down
1 change: 1 addition & 0 deletions samples/typescript/commitAvroSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ async function commitAvroSchema(schemaNameOrId: string, avscFile: string) {
const [result] = await schemaClient.commitSchema({
name,
schema: {
name,
type: SchemaTypes.Avro,
definition,
},
Expand Down

0 comments on commit 80e1f28

Please sign in to comment.