kinesis-consumer/redshift_basic_emitter_test.go
Harlow Ward cd71fd41bc Add Logger interface
To allow for different logging endpoints we'll introduce a Logger
interface that will be passed into the pipeline during initialization.

* Add Logger interface
* Use logger interface in pipeline and emitters
2015-05-03 21:01:14 -07:00

20 lines
453 B
Go

package connector
import (
"testing"
)
func TestCopyStatement(t *testing.T) {
e := RedshiftBasicEmitter{
Delimiter: ",",
S3Bucket: "test_bucket",
TableName: "test_table",
}
f := e.copyStatement("/test.txt")
copyStatement := "COPY test_table FROM 's3://test_bucket/test.txt' CREDENTIALS 'aws_access_key_id=;aws_secret_access_key=' DELIMITER ',';"
if f != copyStatement {
t.Errorf("copyStatement() = %s want %s", f, copyStatement)
}
}