Files
dataset-uploader/features/google_sheets_tracker/authentication.feature

46 lines
1.7 KiB
Gherkin

Feature: Google Sheets Tracker Authentication
As a data engineer
I want to authenticate with Google Sheets API
So that I can track dataset processing status
Background:
Given a temporary credentials directory
Scenario: Successful authentication with valid credentials
Given valid service account credentials
And a valid spreadsheet ID
When I create a sheets tracker
Then the tracker should authenticate successfully
Scenario: Authentication fails with missing credentials file
Given no credentials file
And a valid spreadsheet ID
When I create a sheets tracker
Then the tracker should fail to authenticate
Scenario: Authentication fails with invalid credentials
Given invalid service account credentials
And a valid spreadsheet ID
When I create a sheets tracker
Then the tracker should fail to authenticate
Scenario: Authentication fails without spreadsheet ID
Given valid service account credentials
And no spreadsheet ID
When I create a sheets tracker
Then the tracker should be None
Scenario: Create tracker using environment variables
Given environment variables are set for sheets
When I create a sheets tracker using environment variables
Then the tracker should authenticate successfully
Scenario: Tracker loads column headers correctly
Given valid service account credentials
And a spreadsheet with headers "Dataset Name, Status, Error"
When I create a sheets tracker
Then the tracker should identify column "Dataset Name" at index 0
And the tracker should identify column "Status" at index 1
And the tracker should identify column "Error" at index 2