@@ -2,18 +2,23 @@ import { RedShiftDataSource } from '../src';
22import { RedShiftFakeServer } from './redshiftServer' ;
33import { streamToArray } from '@vulcan-sql/core' ;
44
5- const redShift = new RedShiftFakeServer ( ) ;
5+ let redShift : RedShiftFakeServer ;
66let dataSource : RedShiftDataSource ;
77
8- it ( 'Data source should be activate without any error when all profiles are valid' , async ( ) => {
8+ // All tests in this file are skipped, since it costs money in AWS. As of now, we only run tests in the local environment.
9+ it . skip ( 'Preparing the data source' , async ( ) => {
10+ redShift = new RedShiftFakeServer ( ) ;
11+ } ) ;
12+
13+ it . skip ( 'Data source should be activate without any error when all profiles are valid' , async ( ) => {
914 // Arrange
1015 dataSource = new RedShiftDataSource ( { } , '' , [ redShift . getProfile ( 'profile1' ) ] ) ;
1116
1217 // Act, Assert
1318 await expect ( dataSource . activate ( ) ) . resolves . not . toThrow ( ) ;
1419} ) ;
1520
16- it ( 'Data source should throw error when activating any profile which is invalid' , async ( ) => {
21+ it . skip ( 'Data source should throw error when activating any profile which is invalid' , async ( ) => {
1722 // Arrange
1823 const invalidProfile = redShift . getProfile ( 'profile1' ) ;
1924 invalidProfile . connection . credentials . accessKeyId = '' ;
@@ -26,7 +31,7 @@ it('Data source should throw error when activating any profile which is invalid'
2631 await expect ( dataSource . activate ( ) ) . rejects . toThrow ( ) ;
2732} ) ;
2833
29- it ( 'Data source should return correct rows with 2 chunks' , async ( ) => {
34+ it . skip ( 'Data source should return correct rows with 2 chunks' , async ( ) => {
3035 // Arrange
3136 dataSource = new RedShiftDataSource ( { } , '' , [ redShift . getProfile ( 'profile1' ) ] ) ;
3237 await dataSource . activate ( ) ;
@@ -57,7 +62,7 @@ it('Data source should return correct rows with 2 chunks', async () => {
5762 expect ( rows . length ) . toBe ( 9 ) ;
5863} , 30000 ) ;
5964
60- it ( 'Data source should return correct rows with 1 chunk' , async ( ) => {
65+ it . skip ( 'Data source should return correct rows with 1 chunk' , async ( ) => {
6166 // Arrange
6267 dataSource = new RedShiftDataSource ( { } , '' , [ redShift . getProfile ( 'profile1' ) ] ) ;
6368 await dataSource . activate ( ) ;
@@ -89,7 +94,7 @@ it('Data source should return correct rows with 1 chunk', async () => {
8994 expect ( rows . length ) . toBe ( 5 ) ;
9095} , 30000 ) ;
9196
92- it ( 'Data source should return empty data with no row' , async ( ) => {
97+ it . skip ( 'Data source should return empty data with no row' , async ( ) => {
9398 // Arrange
9499 dataSource = new RedShiftDataSource ( { } , '' , [ redShift . getProfile ( 'profile1' ) ] ) ;
95100 await dataSource . activate ( ) ;
@@ -121,7 +126,7 @@ it('Data source should return empty data with no row', async () => {
121126 expect ( rows . length ) . toBe ( 0 ) ;
122127} , 30000 ) ;
123128
124- it ( 'Data source should work with prepare statements' , async ( ) => {
129+ it . skip ( 'Data source should work with prepare statements' , async ( ) => {
125130 // Arrange
126131 dataSource = new RedShiftDataSource ( { } , '' , [ redShift . getProfile ( 'profile1' ) ] ) ;
127132 await dataSource . activate ( ) ;
@@ -153,7 +158,7 @@ it('Data source should work with prepare statements', async () => {
153158 expect ( rows [ 0 ] . v2 ) . toBe ( '456' ) ;
154159} , 30000 ) ;
155160
156- it ( 'Data source should return correct column types' , async ( ) => {
161+ it . skip ( 'Data source should return correct column types' , async ( ) => {
157162 // Arrange
158163 dataSource = new RedShiftDataSource ( { } , '' , [ redShift . getProfile ( 'profile1' ) ] ) ;
159164 await dataSource . activate ( ) ;
0 commit comments