@@ -5,7 +5,7 @@ import {expect, test} from '@oclif/test'
55describe ( 'avro' , ( ) => {
66 //todo if file is invalid
77 test
8- . timeout ( 10000 ) // added timeout to remove timeout problem
8+ . timeout ( 10000 ) // added timeout to resolve timeout problem
99 . stdout ( )
1010 . command ( [ 'avro' ] )
1111 . exit ( 0 )
@@ -14,21 +14,21 @@ describe('avro', () => {
1414 } )
1515 test
1616 . stdout ( )
17- . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' ] )
17+ . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , 'to_avro '] )
1818 . exit ( 0 )
19- . it ( 'if output is not passed' , ctx => {
19+ . it ( 'if output file is not passed when mendatory ' , ctx => {
2020 expect ( ctx . stdout ) . to . contain ( 'Output file is not provided' )
2121 } )
2222 test
2323 . stdout ( )
24- . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , '-o' , 'output_file.example' ] )
24+ . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , '-o' , 'output_file.example' ] )
2525 . exit ( 0 )
2626 . it ( 'if command not passed' , ctx => {
2727 expect ( ctx . stdout ) . to . contain ( 'Command is empty or not provided' )
2828 } )
2929 test
3030 . stdout ( )
31- . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , '-o' , 'output_file.example' , 'unsupported_command' ] )
31+ . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , '-o' , 'output_file.example' , 'unsupported_command' ] )
3232 . exit ( 0 )
3333 . it ( 'if command is invalid' , ctx => {
3434 expect ( ctx . stdout ) . to . contain ( 'Unsupported Command' )
@@ -45,7 +45,7 @@ describe('avro', () => {
4545
4646 test
4747 . stdout ( )
48- . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , '-o' , 'output_file.example' , 'to_avro' ] )
48+ . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , '-o' , 'output_file.example' , 'to_avro' ] )
4949 . exit ( 0 )
5050 . it ( 'if schema file path is not passed for to_avro' , ctx => {
5151 expect ( ctx . stdout ) . to . contain ( 'Schema file is not provided' )
@@ -55,4 +55,13 @@ describe('avro', () => {
5555 // 1 - get schema
5656 // 2 - to json
5757 // 3 - to avro
58+
59+ test
60+ . stdout ( )
61+ . command ( [ 'avro' , '-f' , 'test/resources/avro/person.avro' , 'get_schema' ] )
62+ . it ( 'if get_schema outputs to console' , ctx => {
63+ expect ( ctx . stdout ) . to . contain ( 'success' )
64+ } )
65+
66+
5867} )
0 commit comments