-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helper | ||
|
||
@test "put java to go" { | ||
run $HADOOP_FS -put $ROOT_TEST_DIR/testdata/foo.txt /_test/kms/foo1 | ||
assert_success | ||
|
||
run $HDFS cat /_test/kms/foo1 | ||
assert_output "bar" | ||
} | ||
|
||
@test "put go to java" { | ||
run $HDFS put $ROOT_TEST_DIR/testdata/foo.txt /_test/kms/foo2 | ||
assert_success | ||
|
||
run HADOOP_FS -cat /_test/kms/foo2 | ||
assert_output "bar" | ||
} | ||
|
||
@test "tail" { | ||
run $HDFS put $ROOT_TEST_DIR/testdata/mobydick.txt /_test/kms/ | ||
assert_success | ||
|
||
run bash -c "$HDFS tail /_test/kms/mobydick.txt > $BATS_TMPDIR/mobydick_test.txt" | ||
assert_success | ||
|
||
SHA=`tail $ROOT_TEST_DIR/testdata/mobydick.txt | shasum | awk '{ print $1 }'` | ||
assert_equal $SHA `shasum < $BATS_TMPDIR/mobydick_test.txt | awk '{ print $1 }'` | ||
} |