-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dataiku/features/pagination
Adding pagination and shared folders
- Loading branch information
Showing
13 changed files
with
143 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
|
||
## [Version 1.1.1](https://github.com/dataiku/dss-plugin-googledrive/releases/tag/v1.1.1) - Feature release - 2021-04-21 | ||
|
||
- Gives access to Shared Drives | ||
- Adds pagination (giving access to directories with more than 100 items) | ||
- Fix issue with empty root id | ||
- Dependencies updates (google-api-python-client, httplib2) |
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,47 @@ | ||
pipeline { | ||
options { disableConcurrentBuilds() } | ||
agent { label 'dss-plugin-tests'} | ||
environment { | ||
PLUGIN_INTEGRATION_TEST_INSTANCE="/home/jenkins-agent/instance_config.json" | ||
} | ||
stages { | ||
stage('Run Unit Tests') { | ||
steps { | ||
sh 'echo "Running unit tests"' | ||
catchError(stageResult: 'FAILURE') { | ||
sh """ | ||
make unit-tests | ||
""" | ||
} | ||
sh 'echo "Done with unit tests"' | ||
} | ||
} | ||
stage('Run Integration Tests') { | ||
steps { | ||
sh 'echo "Running integration tests"' | ||
catchError(stageResult: 'FAILURE') { | ||
sh """ | ||
make integration-tests | ||
""" | ||
} | ||
sh 'echo "Done with integration tests"' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
script { | ||
allure([ | ||
includeProperties: false, | ||
jdk: '', | ||
properties: [], | ||
reportBuildPolicy: 'ALWAYS', | ||
results: [[path: 'tests/allure_report']] | ||
]) | ||
|
||
def status = currentBuild.currentResult | ||
sh "file_name=\$(echo ${env.JOB_NAME} | tr '/' '-').status; touch \$file_name; echo \"${env.BUILD_URL};${env.CHANGE_TITLE};${env.CHANGE_AUTHOR};${env.CHANGE_URL};${env.BRANCH_NAME};${status};\" >> $HOME/daily-statuses/\$file_name" | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
google-api-python-client==1.12.1 | ||
google-api-python-client==1.12.8 | ||
google-auth==1.21.2 | ||
google-auth-httplib2==0.0.4 | ||
httplib2==0.18.0 | ||
httplib2==0.19.0 | ||
oauth2client==4.1.3 |
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
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,2 @@ | ||
[pytest] | ||
usefixtures = plugin dss_target |
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,3 @@ | ||
pytest==6.2.1 | ||
dataiku-api-client | ||
git+git://github.com/dataiku/dataiku-plugin-tests-utils.git@master#egg=dataiku-plugin-tests-utils |
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,7 @@ | ||
from dku_plugin_test_utils import dss_scenario | ||
|
||
TEST_PROJECT_KEY = "PLUGINTESTGOOGLEDRIVE" | ||
|
||
|
||
def test_run_googledrive_directory_pagination(user_dss_clients): | ||
dss_scenario.run(user_dss_clients, project_key=TEST_PROJECT_KEY, scenario_id="DirectoryPagination") |
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,2 @@ | ||
pytest==6.2.1 | ||
allure-pytest==2.8.29 |
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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import os | ||
import sys | ||
|
||
## Add stuff to the path to enable exec outside of DSS | ||
#plugin_root = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | ||
#sys.path.append(os.path.join(plugin_root, 'python-lib')) | ||
|
||
#from dku_googledrive.googledrive_helpers import is_directory | ||
import pytest | ||
from dku_googledrive.googledrive_utils import GoogleDriveUtils | ||
|
||
|
||
def test_is_directory(): | ||
not_a_directory = {'mimeType' : "text/csv"} | ||
directory = {'mimeType' : "application/vnd.google-apps.folder"} | ||
assert GoogleDriveUtils.is_directory(not_a_directory) == False | ||
assert GoogleDriveUtils.is_directory(directory) == True | ||
class TestCommonMethods: | ||
|
||
def test_is_directory(self): | ||
not_a_directory = {'mimeType': "text/csv"} | ||
directory = {'mimeType': "application/vnd.google-apps.folder"} | ||
assert GoogleDriveUtils.is_directory(not_a_directory) == False | ||
assert GoogleDriveUtils.is_directory(directory) == True |