Skip to content

Commit

Permalink
#48 Add logintype param (#49)
Browse files Browse the repository at this point in the history
* #48: Add JDBC parameter logintype

* Create archive of test results
  • Loading branch information
kaklakariada authored Feb 23, 2022
1 parent c091c58 commit 1a1c8d0
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 12 deletions.
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changes

* [0.6.1](changes_0.6.1.md)
* [0.6.0](changes_0.6.0.md)
* [0.5.0](changes_0.5.0.md)
* [0.4.2](changes_0.4.2.md)
Expand Down
15 changes: 15 additions & 0 deletions doc/changes/changes_0.6.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Exasol Tableau Connector 0.6.1, released 2022-02-23

Code name: Support renamed JDBC parameter `logintype`

## Summary

This release updates the JDBC connector and adds support for the renamed parameter `logintype` that will be added with JDBC driver versions 7.1.7 and 8.0.0. The original parameter `loginType` did not follow naming conventions and was undocumented.

The JDBC connector will continue to work with older and newer JDBC drivers by using both variants of the parameter.

There where no changes for the ODBC connector.

## Features

* #48: Added support for renamed JDBC parameter `logintype`
6 changes: 3 additions & 3 deletions javascript-test/jdbc.connectionProperties.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Tableau Server', () => {
username: '',
':tableau-server-user': 'tabuser',
password: 'exapassword'
})).toEqual({ user: 'tabuser', loginType: '2' });
})).toEqual({ user: 'tabuser', logintype: 'gss', loginType: '2' });
});

test('Viewer Credentials auth', () => {
Expand All @@ -53,7 +53,7 @@ describe('Tableau Server', () => {
username: '',
':tableau-server-user': 'normaluser',
password: 'exapassword'
})).toEqual({ user: 'normaluser', loginType: '2' });
})).toEqual({ user: 'normaluser', logintype: 'gss', loginType: '2' });
});
});

Expand All @@ -65,5 +65,5 @@ test('Debugging enabled', () => {
':tableau-server-user': 'serveruser',
password: 'exapassword',
'v-debug': 'true'
})).toEqual({ user: 'serveruser', loginType: '2', 'jdbc-driver-debug': "authentication=auth-integrated, workgroup-auth-mode='kerberos-impersonate', username='normaluser', :tableau-server-user='serveruser'"});
})).toEqual({ user: 'serveruser', logintype: 'gss', loginType: '2', 'jdbc-driver-debug': "authentication=auth-integrated, workgroup-auth-mode='kerberos-impersonate', username='normaluser', :tableau-server-user='serveruser'"});
});
1 change: 1 addition & 0 deletions src/exasol_jdbc/connectionProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
} else {
props["user"] = serverUser;
props["loginType"] = "2";
props["logintype"] = "gss";
}

return props;
Expand Down
2 changes: 1 addition & 1 deletion src/exasol_jdbc/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>

<connector-plugin class="exasol_jdbc" superclass="jdbc" plugin-version="0.6.0" name="Exasol JDBC" version="18.1" min-version-tableau="2021.1">
<connector-plugin class="exasol_jdbc" superclass="jdbc" plugin-version="0.6.1" name="Exasol JDBC" version="18.1" min-version-tableau="2021.1">
<vendor-information>
<company name="Exasol AG"/>
<support-link url="https://www.exasol.com"/>
Expand Down
2 changes: 1 addition & 1 deletion src/exasol_odbc/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>

<connector-plugin class="exasol_odbc" superclass="odbc" plugin-version="0.6.0" name="Exasol ODBC" version="18.1" min-version-tableau="2021.1">
<connector-plugin class="exasol_odbc" superclass="odbc" plugin-version="0.6.1" name="Exasol ODBC" version="18.1" min-version-tableau="2021.1">
<vendor-information>
<company name="Exasol AG"/>
<support-link url="https://www.exasol.com/"/>
Expand Down
22 changes: 17 additions & 5 deletions tools/run_tdvt_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ set -euo pipefail

project_dir="$( cd "$(dirname "$0")/.." >/dev/null 2>&1 ; pwd -P )"
readonly project_dir
target_dir="$project_dir/target/"
target_dir="$project_dir/target"
readonly target_dir

skip_generate=false

get_version() {
type="$1"
grep "plugin-version" < "$project_dir/src/exasol_$type/manifest.xml" | sed 's/^.*plugin-version="\([^"]*\)".*$/\1/'
}

run_tests () {
type="$1"
echo "Running $type tests"

cd "$project_dir/tdvt_$type"
echo "Cleanup results in $(pwd)"
rm -vf tabquery_logs.zip tdvt_actuals_combined.zip tdvt_output_combined.json test_results_combined.csv
rm -f tabquery_logs.zip tdvt_actuals_combined.zip tdvt_output_combined.json test_results_combined.csv tdvt.log_combined.txt

if [ "$skip_generate" == "true" ] ; then
echo "Starting tests without --generate..."
Expand All @@ -24,11 +29,18 @@ run_tests () {
python -m tdvt.tdvt run "exasol_$type" --generate
fi

test_results_dir="$target_dir/tdvt_results_$type"
version=$(get_version "$type")
test_results_dir_name="tdvt_results_${type}_${version}"
test_results_archive="$target_dir/${test_results_dir_name}.tar.gz"
test_results_dir="$target_dir/$test_results_dir_name"
rm -rf "$test_results_dir"
rm -f "$test_results_archive"
echo "Copy test results to $test_results_dir"
mkdir -vp "$test_results_dir"
cp -v tabquery_logs.zip tdvt_actuals_combined.zip tdvt_output_combined.json test_results_combined.csv "$test_results_dir"
mkdir -p "$test_results_dir"
cp tabquery_logs.zip tdvt_actuals_combined.zip tdvt_output_combined.json test_results_combined.csv tdvt.log_combined.txt "$test_results_dir"
cd "$test_results_dir/.."
tar -czf "${test_results_archive}" "$test_results_dir_name"
echo "Created test result archive $test_results_archive"
}

test_type=${1-}
Expand Down
4 changes: 2 additions & 2 deletions tools/sign_connector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ verify_signature() {

sign_jar() {
type="$1"
version=$(get_version $type)
version=$(get_version "$type")
jar_file="$target_dir/exasol_$type.taco"
signed_jar="$target_dir/tableau-exasol-connector-$type-$version.taco"

Expand All @@ -57,7 +57,7 @@ sign_jar() {

get_version() {
type="$1"
cat "src/exasol_$type/manifest.xml" | grep "plugin-version" | sed 's/^.*plugin-version="\([^"]*\)".*$/\1/'
grep "plugin-version" < "$project_dir/src/exasol_$type/manifest.xml" | sed 's/^.*plugin-version="\([^"]*\)".*$/\1/'
}

sign_jar jdbc
Expand Down

0 comments on commit 1a1c8d0

Please sign in to comment.