You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/07/05 09:42:29 UTC
[incubator-devlake] branch main updated: refactor: remove e2e folder (#2414)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new dde0f41d refactor: remove e2e folder (#2414)
dde0f41d is described below
commit dde0f41d5e68b45d978ebaad1cdb053c721361e3
Author: abeizn <10...@users.noreply.github.com>
AuthorDate: Tue Jul 5 17:42:25 2022 +0800
refactor: remove e2e folder (#2414)
---
e2e/README.md | 74 --------------------
e2e/config.go | 28 --------
e2e/database.go | 78 ----------------------
e2e/domain_board_issues_test.go | 56 ----------------
e2e/domain_board_sprints_test.go | 56 ----------------
e2e/domain_boards_test.go | 56 ----------------
e2e/domain_builds_test.go | 56 ----------------
e2e/domain_changelogs_test.go | 56 ----------------
e2e/domain_commits_test.go | 55 ---------------
e2e/domain_issue_asignee_history_test.go | 56 ----------------
e2e/domain_issue_sprints_history_test.go | 56 ----------------
e2e/domain_issue_status_history_test.go | 56 ----------------
e2e/domain_issues_test.go | 55 ---------------
e2e/domain_jobs_test.go | 56 ----------------
e2e/domain_notes_test.go | 56 ----------------
e2e/domain_prs_test.go | 56 ----------------
e2e/domain_repo_commits_test.go | 56 ----------------
e2e/domain_repos_test.go | 55 ---------------
e2e/domain_sprint_issues_test.go | 56 ----------------
e2e/domain_sprints_test.go | 56 ----------------
e2e/domain_users_test.go | 56 ----------------
e2e/domain_worklogs_test.go | 56 ----------------
e2e/github_commits_test.go | 55 ---------------
e2e/github_issue_comments_test.go | 55 ---------------
e2e/github_issue_events_test.go | 55 ---------------
e2e/github_issue_labels.go | 55 ---------------
e2e/github_issues_label_issue_test.go | 55 ---------------
e2e/github_issues_test.go | 55 ---------------
e2e/github_pull_request_comments_test.go | 55 ---------------
...ithub_pull_request_commit_pull_requests_test.go | 55 ---------------
e2e/github_pull_request_commits_test.go | 55 ---------------
e2e/github_pull_requests_test.go | 55 ---------------
e2e/github_repo_commits_test.go | 55 ---------------
e2e/github_repo_test.go | 55 ---------------
e2e/github_users_test.go | 56 ----------------
e2e/gitlab_commits_test.go | 56 ----------------
...ab_merge_request_commits_merge_requests_test.go | 56 ----------------
e2e/gitlab_merge_request_commits_test.go | 56 ----------------
e2e/gitlab_merge_request_notes_test.go | 56 ----------------
e2e/gitlab_mrs_test.go | 56 ----------------
e2e/gitlab_pipelines_test.go | 56 ----------------
e2e/gitlab_project_commits_test.go | 56 ----------------
e2e/gitlab_projects_test.go | 56 ----------------
e2e/gitlab_reviewers_test.go | 56 ----------------
e2e/gitlab_users_test.go | 56 ----------------
e2e/jenkins_builds_test.go | 56 ----------------
e2e/jenkins_jobs_test.go | 56 ----------------
e2e/jira_board_issues_test.go | 56 ----------------
e2e/jira_board_sprints_test.go | 56 ----------------
e2e/jira_boards_test.go | 56 ----------------
e2e/jira_changelog_items_test.go | 56 ----------------
e2e/jira_changelogs_test.go | 56 ----------------
e2e/jira_issues_test.go | 56 ----------------
e2e/jira_projects_test.go | 56 ----------------
e2e/jira_remote_links_test.go | 56 ----------------
e2e/jira_sprint_issues_test.go | 56 ----------------
e2e/jira_sprints_test.go | 56 ----------------
e2e/jira_users_test.go | 56 ----------------
e2e/jira_worklogs_test.go | 56 ----------------
59 files changed, 3301 deletions(-)
diff --git a/e2e/README.md b/e2e/README.md
deleted file mode 100644
index 96b58af7..00000000
--- a/e2e/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-## E2E Tests
-
-## Why?
-
-To ensure data integrity of the application, we need to make sure that the result
-data matches what we expect to get from accessing a real API as if a real user is
-using it. Previously, we relied on manual testing.
-
-Automated tests allow us to do this in a very convenient, low cost way
-that is easily repeatable.
-
-## What it does
-
-1. Automatically or Manually trigger all collection / enrichment / conversion tasks
-2. Tests access all key data models from our DB to determine if the expected number
-of rows were collected and processed or not.
-
-## How to run
-
-1. Collect all data normally for all repos.
-2. Wait until all jobs are done
-3. Then you can run tests with this command: `make real-e2e-test`
-
-## JSON samples to send to DevLake (POST /pipelines)
-
-### Jira
-
-{
- "name": "jira",
- "tasks": [[{
- "Plugin": "jira",
- "Options": {
- "connectionId": `<your_connection_id>`,
- "boardId": 8
- }
- }]]
-}
-
-### GitLab
-
-{
- "name": "gitlab",
- "tasks": [[{
- "Plugin": "gitlab",
- "Options": {
- "projectId": 8967944
- }
- }]]
-}
-
-### GitHub
-
-{
- "name": "github",
- "tasks": [[{
- "Plugin": "github",
- "Options": {
- "repo": "lake",
- "owner": "merico-dev"
- }
- }]]
-}
-
-### Jenkins
-
-{
- "name": "jenkins",
- "tasks": [[
- {
- "plugin": "jenkins",
- "options": {}
- }
- ]]
-}
\ No newline at end of file
diff --git a/e2e/config.go b/e2e/config.go
deleted file mode 100644
index 59002f7a..00000000
--- a/e2e/config.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import "github.com/spf13/viper"
-
-func LoadConfigFile() *viper.Viper {
- V := viper.New()
- V.SetConfigFile("../.env")
- _ = V.ReadInConfig()
- V.AutomaticEnv()
- return V
-}
diff --git a/e2e/database.go b/e2e/database.go
deleted file mode 100644
index c69db039..00000000
--- a/e2e/database.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "database/sql"
- "fmt"
- "log"
- "net/url"
- "strings"
-
- mysqlGorm "gorm.io/driver/mysql"
- postgresGorm "gorm.io/driver/postgres"
- "gorm.io/gorm"
-)
-
-func InitializeDb() (*sql.DB, error) {
- v := LoadConfigFile()
- dbUrl := v.GetString("DB_URL")
- u, err := url.Parse(dbUrl)
- if err != nil {
- return nil, err
- }
-
- var db *sql.DB
- switch strings.ToLower(u.Scheme) {
- case "mysql":
- dbUrl = fmt.Sprintf(("%s@tcp(%s)%s?%s"), u.User.String(), u.Host, u.Path, u.RawQuery)
- db, err = sql.Open(u.Scheme, dbUrl)
- case "postgresql", "postgres", "pg":
- db, err = sql.Open(`pgx`, dbUrl)
- default:
- return nil, fmt.Errorf("invalid DB_URL:%s", dbUrl)
- }
- if err != nil {
- return nil, err
- }
- pingErr := db.Ping()
- if pingErr != nil {
- log.Fatal(pingErr)
- return nil, err
- }
- fmt.Println("Connected!")
- return db, nil
-}
-
-func InitializeGormDb() (*gorm.DB, error) {
- connectionString := "merico:merico@tcp(localhost:3306)/lake"
- db, err := gorm.Open(mysqlGorm.Open(connectionString))
- if err != nil {
- return nil, err
- }
- return db, nil
-}
-
-func InitializeGormDb2() (*gorm.DB, error) {
- connectionString := "merico:merico@tcp(localhost:3306)/lake"
- db, err := gorm.Open(postgresGorm.Open(connectionString))
- if err != nil {
- return nil, err
- }
- return db, nil
-}
diff --git a/e2e/domain_board_issues_test.go b/e2e/domain_board_issues_test.go
deleted file mode 100644
index 684506f5..00000000
--- a/e2e/domain_board_issues_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainBoardIssue struct {
- BoardId string `json:"board_id"`
-}
-
-func TestDomainBoardIssues(t *testing.T) {
- var domainBoardIssues []DomainBoardIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT board_id FROM lake.issues i JOIN board_issues bi ON i.id = bi.issue_id WHERE resolution_date < '2021-10-25 17:00:58.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBoardIssue DomainBoardIssue
- if err := rows.Scan(&domainBoardIssue.BoardId); err != nil {
- panic(err)
- }
- domainBoardIssues = append(domainBoardIssues, domainBoardIssue)
- }
- assert.Equal(t, 2687, len(domainBoardIssues))
-}
diff --git a/e2e/domain_board_sprints_test.go b/e2e/domain_board_sprints_test.go
deleted file mode 100644
index 723fe1dc..00000000
--- a/e2e/domain_board_sprints_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainBoardSprint struct {
- BoardId string `json:"board_id"`
-}
-
-func TestDomainBoardSprints(t *testing.T) {
- var domainBoardSprints []DomainBoardSprint
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT bs.board_id FROM lake.board_sprints bs JOIN sprints s ON bs.sprint_id = s.id WHERE ended_date < '2022-01-14 14:10:00.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBoardSprint DomainBoardSprint
- if err := rows.Scan(&domainBoardSprint.BoardId); err != nil {
- panic(err)
- }
- domainBoardSprints = append(domainBoardSprints, domainBoardSprint)
- }
- assert.Equal(t, 61, len(domainBoardSprints))
-}
diff --git a/e2e/domain_boards_test.go b/e2e/domain_boards_test.go
deleted file mode 100644
index 22e2b4cd..00000000
--- a/e2e/domain_boards_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainBoard struct {
- Id string
-}
-
-func TestDomainBoards(t *testing.T) {
- var domainBoards []DomainBoard
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM lake.builds WHERE started_date < '2021-04-09 09:49:07.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBoard DomainBoard
- if err := rows.Scan(&domainBoard.Id); err != nil {
- panic(err)
- }
- domainBoards = append(domainBoards, domainBoard)
- }
- assert.Equal(t, 2904, len(domainBoards))
-}
diff --git a/e2e/domain_builds_test.go b/e2e/domain_builds_test.go
deleted file mode 100644
index f6177fad..00000000
--- a/e2e/domain_builds_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainBuild struct {
- Id string
-}
-
-func TestDomainBuilds(t *testing.T) {
- var domainBuilds []DomainBuild
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM lake.builds WHERE started_date < '2021-05-14 15:06:50.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBuild DomainBuild
- if err := rows.Scan(&domainBuild.Id); err != nil {
- panic(err)
- }
- domainBuilds = append(domainBuilds, domainBuild)
- }
- assert.Equal(t, 4266, len(domainBuilds))
-}
diff --git a/e2e/domain_changelogs_test.go b/e2e/domain_changelogs_test.go
deleted file mode 100644
index e3dec350..00000000
--- a/e2e/domain_changelogs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainChangelog struct {
- Id string
-}
-
-func TestDomainChangelogs(t *testing.T) {
- var domainChangelogs []DomainChangelog
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM lake.changelogs WHERE created_date < '2020-06-20 06:18:24.880';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainChangelog DomainChangelog
- if err := rows.Scan(&domainChangelog.Id); err != nil {
- panic(err)
- }
- domainChangelogs = append(domainChangelogs, domainChangelog)
- }
- assert.Equal(t, 1742, len(domainChangelogs))
-}
diff --git a/e2e/domain_commits_test.go b/e2e/domain_commits_test.go
deleted file mode 100644
index e76ae650..00000000
--- a/e2e/domain_commits_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainCommit struct {
- Sha string `json:"sha"`
-}
-
-func TestDomainCommits(t *testing.T) {
- var commits []DomainCommit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT sha FROM commits WHERE authored_date < '2021-11-24 19:22:29.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var commit DomainCommit
- if err := rows.Scan(&commit.Sha); err != nil {
- panic(err)
- }
- commits = append(commits, commit)
- }
- assert.Equal(t, 19829, len(commits))
-}
diff --git a/e2e/domain_issue_asignee_history_test.go b/e2e/domain_issue_asignee_history_test.go
deleted file mode 100644
index c3f2b1db..00000000
--- a/e2e/domain_issue_asignee_history_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainIssueAssigneeHistory struct {
- IssueId string `json:"issue_id"`
-}
-
-func TestDomainIssueAssigneeHistorys(t *testing.T) {
- var domainBoardSprints []DomainIssueAssigneeHistory
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT issue_id FROM lake.issue_assignee_history WHERE start_date < '2022-06-12 00:44:34.880';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBoardSprint DomainIssueAssigneeHistory
- if err := rows.Scan(&domainBoardSprint.IssueId); err != nil {
- panic(err)
- }
- domainBoardSprints = append(domainBoardSprints, domainBoardSprint)
- }
- assert.Equal(t, 2591, len(domainBoardSprints))
-}
diff --git a/e2e/domain_issue_sprints_history_test.go b/e2e/domain_issue_sprints_history_test.go
deleted file mode 100644
index 741e22d4..00000000
--- a/e2e/domain_issue_sprints_history_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainIssueStatusHistory struct {
- IssueId string `json:"issue_id"`
-}
-
-func TestDomainIssueStatusHistorys(t *testing.T) {
- var domainBoardSprints []DomainIssueStatusHistory
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT issue_id FROM lake.issue_sprints_history WHERE start_date < '2020-06-17 07:29:24.052';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBoardSprint DomainIssueStatusHistory
- if err := rows.Scan(&domainBoardSprint.IssueId); err != nil {
- panic(err)
- }
- domainBoardSprints = append(domainBoardSprints, domainBoardSprint)
- }
- assert.Equal(t, 8, len(domainBoardSprints))
-}
diff --git a/e2e/domain_issue_status_history_test.go b/e2e/domain_issue_status_history_test.go
deleted file mode 100644
index a164d700..00000000
--- a/e2e/domain_issue_status_history_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainIssueSprintHistory struct {
- SprintId string `json:"sprint_id"`
-}
-
-func TestDomainIssueSprintHistorys(t *testing.T) {
- var domainBoardSprints []DomainIssueSprintHistory
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT sprint_id FROM lake.issue_sprints_history WHERE start_date < '2020-06-17 07:29:24.052';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainBoardSprint DomainIssueSprintHistory
- if err := rows.Scan(&domainBoardSprint.SprintId); err != nil {
- panic(err)
- }
- domainBoardSprints = append(domainBoardSprints, domainBoardSprint)
- }
- assert.Equal(t, 8, len(domainBoardSprints))
-}
diff --git a/e2e/domain_issues_test.go b/e2e/domain_issues_test.go
deleted file mode 100644
index c7bed558..00000000
--- a/e2e/domain_issues_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainIssue struct {
- Id string
-}
-
-func TestDomainIssues(t *testing.T) {
- var issues []DomainIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT id FROM lake.issues WHERE resolution_date < '2021-10-25 17:00:58.000';")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issue DomainIssue
- if err := rows.Scan(&issue.Id); err != nil {
- panic(err)
- }
- issues = append(issues, issue)
- }
- assert.Equal(t, 2847, len(issues))
-}
diff --git a/e2e/domain_jobs_test.go b/e2e/domain_jobs_test.go
deleted file mode 100644
index 174a2328..00000000
--- a/e2e/domain_jobs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainJob struct {
- Id string
-}
-
-func TestDomainJobs(t *testing.T) {
- var domainJobs []DomainJob
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM jobs;"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainJob DomainJob
- if err := rows.Scan(&domainJob.Id); err != nil {
- panic(err)
- }
- domainJobs = append(domainJobs, domainJob)
- }
- assert.Equal(t, true, len(domainJobs) > 0)
-}
diff --git a/e2e/domain_notes_test.go b/e2e/domain_notes_test.go
deleted file mode 100644
index bcab0077..00000000
--- a/e2e/domain_notes_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainNote struct {
- Id string
-}
-
-func TestDomainNotes(t *testing.T) {
- var domainNotes []DomainNote
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM lake.notes WHERE created_date < '2019-10-24 02:23:43.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainNote DomainNote
- if err := rows.Scan(&domainNote.Id); err != nil {
- panic(err)
- }
- domainNotes = append(domainNotes, domainNote)
- }
- assert.Equal(t, 4352, len(domainNotes))
-}
diff --git a/e2e/domain_prs_test.go b/e2e/domain_prs_test.go
deleted file mode 100644
index 49f01ac0..00000000
--- a/e2e/domain_prs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainPullRequest struct {
- Id string
-}
-
-func TestDomainPullRequests(t *testing.T) {
- var domainPullRequests []DomainPullRequest
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM pull_requests WHERE created_date < '2020-07-27 01:26:13.465';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainPullRequest DomainPullRequest
- if err := rows.Scan(&domainPullRequest.Id); err != nil {
- panic(err)
- }
- domainPullRequests = append(domainPullRequests, domainPullRequest)
- }
- assert.Equal(t, 6, len(domainPullRequests))
-}
diff --git a/e2e/domain_repo_commits_test.go b/e2e/domain_repo_commits_test.go
deleted file mode 100644
index 62f51a45..00000000
--- a/e2e/domain_repo_commits_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainPullRequestCommit struct {
- CommitSha string `json:"commit_sha"`
-}
-
-func TestDomainPullRequestCommits(t *testing.T) {
- var domainPullRequestCommits []DomainPullRequestCommit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT commit_sha FROM lake.repo_commits rc JOIN commits c ON c.sha = rc.commit_sha where authored_date < '2019-04-21 10:12:19.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainPullRequestCommit DomainPullRequestCommit
- if err := rows.Scan(&domainPullRequestCommit.CommitSha); err != nil {
- panic(err)
- }
- domainPullRequestCommits = append(domainPullRequestCommits, domainPullRequestCommit)
- }
- assert.Equal(t, 1617, len(domainPullRequestCommits))
-}
diff --git a/e2e/domain_repos_test.go b/e2e/domain_repos_test.go
deleted file mode 100644
index 1679e97a..00000000
--- a/e2e/domain_repos_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainRepo struct {
- Id string
-}
-
-func TestDomainRepos(t *testing.T) {
- var repos []DomainRepo
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT id FROM repos")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var repo DomainRepo
- if err := rows.Scan(&repo.Id); err != nil {
- panic(err)
- }
- repos = append(repos, repo)
- }
- assert.Equal(t, true, len(repos) > 0)
-}
diff --git a/e2e/domain_sprint_issues_test.go b/e2e/domain_sprint_issues_test.go
deleted file mode 100644
index 227d05ed..00000000
--- a/e2e/domain_sprint_issues_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainSprintIssue struct {
- IssueId string `json:"issue_id"`
-}
-
-func TestDomainSprintIssues(t *testing.T) {
- var domainSprintIssues []DomainSprintIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT issue_id FROM lake.sprint_issues si JOIN lake.issues i ON si.issue_id = i.id where created_date < '2020-06-20 06:18:24.880';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainSprintIssue DomainSprintIssue
- if err := rows.Scan(&domainSprintIssue.IssueId); err != nil {
- panic(err)
- }
- domainSprintIssues = append(domainSprintIssues, domainSprintIssue)
- }
- assert.Equal(t, 999, len(domainSprintIssues))
-}
diff --git a/e2e/domain_sprints_test.go b/e2e/domain_sprints_test.go
deleted file mode 100644
index 67e100af..00000000
--- a/e2e/domain_sprints_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainSprint struct {
- Id string
-}
-
-func TestDomainSprints(t *testing.T) {
- var domainSprints []DomainSprint
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM lake.sprints where started_date < '2020-07-27 01:26:13.465';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainSprint DomainSprint
- if err := rows.Scan(&domainSprint.Id); err != nil {
- panic(err)
- }
- domainSprints = append(domainSprints, domainSprint)
- }
- assert.Equal(t, 4, len(domainSprints))
-}
diff --git a/e2e/domain_users_test.go b/e2e/domain_users_test.go
deleted file mode 100644
index 58d02372..00000000
--- a/e2e/domain_users_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainUser struct {
- Id string
-}
-
-func TestDomainUsers(t *testing.T) {
- var users []DomainUser
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM users"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var user DomainUser
- if err := rows.Scan(&user.Id); err != nil {
- panic(err)
- }
- users = append(users, user)
- }
- assert.Equal(t, true, len(users) > 0)
-}
diff --git a/e2e/domain_worklogs_test.go b/e2e/domain_worklogs_test.go
deleted file mode 100644
index 44ff3b6d..00000000
--- a/e2e/domain_worklogs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type DomainWorklog struct {
- AuthorId string `json:"author_id"`
-}
-
-func TestDomainWorklogs(t *testing.T) {
- var domainWorklogs []DomainWorklog
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT author_id FROM lake.worklogs w JOIN lake.issues i ON w.issue_id = i.id where started_date < '2020-06-20 06:18:24.880';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var domainWorklog DomainWorklog
- if err := rows.Scan(&domainWorklog.AuthorId); err != nil {
- panic(err)
- }
- domainWorklogs = append(domainWorklogs, domainWorklog)
- }
- assert.Equal(t, 987, len(domainWorklogs))
-}
diff --git a/e2e/github_commits_test.go b/e2e/github_commits_test.go
deleted file mode 100644
index 388e4ea7..00000000
--- a/e2e/github_commits_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubCommit struct {
- Sha string `json:"sha"`
-}
-
-func TestGitHubCommits(t *testing.T) {
- var commits []GithubCommit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT sha FROM github_commits where authored_date < '2021-11-24 19:22:29.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var commit GithubCommit
- if err := rows.Scan(&commit.Sha); err != nil {
- panic(err)
- }
- commits = append(commits, commit)
- }
- assert.Equal(t, 874, len(commits))
-}
diff --git a/e2e/github_issue_comments_test.go b/e2e/github_issue_comments_test.go
deleted file mode 100644
index e625475d..00000000
--- a/e2e/github_issue_comments_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubIssueComment struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGitHubIssueComments(t *testing.T) {
- var issueComments []GithubIssueComment
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM github_issue_comments where github_created_at < '2021-12-25 04:40:11.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issueComment GithubIssueComment
- if err := rows.Scan(&issueComment.GithubId); err != nil {
- panic(err)
- }
- issueComments = append(issueComments, issueComment)
- }
- assert.Equal(t, 781, len(issueComments))
-}
diff --git a/e2e/github_issue_events_test.go b/e2e/github_issue_events_test.go
deleted file mode 100644
index cb8202a7..00000000
--- a/e2e/github_issue_events_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubIssueEvent struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGitHubIssueEvents(t *testing.T) {
- var issueEvents []GithubIssueEvent
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM github_issue_events where github_created_at < '2021-12-25 04:40:11.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issueEvent GithubIssueEvent
- if err := rows.Scan(&issueEvent.GithubId); err != nil {
- panic(err)
- }
- issueEvents = append(issueEvents, issueEvent)
- }
- assert.Equal(t, 3899, len(issueEvents))
-}
diff --git a/e2e/github_issue_labels.go b/e2e/github_issue_labels.go
deleted file mode 100644
index e96f705f..00000000
--- a/e2e/github_issue_labels.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubIssueLabels struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGithubIssueLabelss(t *testing.T) {
- var issues []GithubIssueLabels
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM lake.github_issue_labels")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issue GithubIssueLabels
- if err := rows.Scan(&issue.GithubId); err != nil {
- panic(err)
- }
- issues = append(issues, issue)
- }
- assert.Equal(t, true, len(issues) > 0)
-}
diff --git a/e2e/github_issues_label_issue_test.go b/e2e/github_issues_label_issue_test.go
deleted file mode 100644
index 709c9714..00000000
--- a/e2e/github_issues_label_issue_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubIssueLabelIssue struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGithubIssueLabelIssues(t *testing.T) {
- var issues []GithubIssueLabelIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM lake.github_issues gi JOIN lake.github_issue_label_issues gili ON gili.issue_id = gi.github_id where github_created_at < '2021-11-24 19:22:29.000';")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issue GithubIssueLabelIssue
- if err := rows.Scan(&issue.GithubId); err != nil {
- panic(err)
- }
- issues = append(issues, issue)
- }
- assert.Equal(t, 561, len(issues))
-}
diff --git a/e2e/github_issues_test.go b/e2e/github_issues_test.go
deleted file mode 100644
index 5972ff24..00000000
--- a/e2e/github_issues_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubIssue struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGithubIssues(t *testing.T) {
- var issues []GithubIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM github_issues where github_created_at < '2021-12-25 04:40:11.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issue GithubIssue
- if err := rows.Scan(&issue.GithubId); err != nil {
- panic(err)
- }
- issues = append(issues, issue)
- }
- assert.Equal(t, 490, len(issues))
-}
diff --git a/e2e/github_pull_request_comments_test.go b/e2e/github_pull_request_comments_test.go
deleted file mode 100644
index 53d329a3..00000000
--- a/e2e/github_pull_request_comments_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubPullRequestComment struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGithubPullRequestComments(t *testing.T) {
- var PullRequestComments []GithubPullRequestComment
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM github_pull_request_comments where github_created_at < '2021-12-25 04:40:11.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var PullRequestComment GithubPullRequestComment
- if err := rows.Scan(&PullRequestComment.GithubId); err != nil {
- panic(err)
- }
- PullRequestComments = append(PullRequestComments, PullRequestComment)
- }
- assert.Equal(t, 401, len(PullRequestComments))
-}
diff --git a/e2e/github_pull_request_commit_pull_requests_test.go b/e2e/github_pull_request_commit_pull_requests_test.go
deleted file mode 100644
index c51beca7..00000000
--- a/e2e/github_pull_request_commit_pull_requests_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubPRJoin struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGithubPRJoins(t *testing.T) {
- var issues []GithubPRJoin
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM lake.github_pull_requests pr JOIN github_pull_request_commit_pull_requests prj ON prj.pull_request_id = pr.github_id where github_created_at < '2021-12-25 04:40:11.000';")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var issue GithubPRJoin
- if err := rows.Scan(&issue.GithubId); err != nil {
- panic(err)
- }
- issues = append(issues, issue)
- }
- assert.Equal(t, 1705, len(issues))
-}
diff --git a/e2e/github_pull_request_commits_test.go b/e2e/github_pull_request_commits_test.go
deleted file mode 100644
index 066680eb..00000000
--- a/e2e/github_pull_request_commits_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubPullRequestCommit struct {
- CommitSha string `json:"commit_sha"`
-}
-
-func TestGithubPullRequestCommits(t *testing.T) {
- var PullRequestCommits []GithubPullRequestCommit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT sha FROM github_pull_request_commits where authored_date < '2021-12-25 04:40:11.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var PullRequestCommit GithubPullRequestCommit
- if err := rows.Scan(&PullRequestCommit.CommitSha); err != nil {
- panic(err)
- }
- PullRequestCommits = append(PullRequestCommits, PullRequestCommit)
- }
- assert.Equal(t, 1505, len(PullRequestCommits))
-}
diff --git a/e2e/github_pull_requests_test.go b/e2e/github_pull_requests_test.go
deleted file mode 100644
index 26485588..00000000
--- a/e2e/github_pull_requests_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubPullRequest struct {
- GithubId int `json:"github_id"`
-}
-
-func TestGithubPullRequests(t *testing.T) {
- var pullRequests []GithubPullRequest
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM github_pull_requests where github_created_at < '2021-12-25 04:40:11.000'")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var pullRequest GithubPullRequest
- if err := rows.Scan(&pullRequest.GithubId); err != nil {
- panic(err)
- }
- pullRequests = append(pullRequests, pullRequest)
- }
- assert.Equal(t, 512, len(pullRequests))
-}
diff --git a/e2e/github_repo_commits_test.go b/e2e/github_repo_commits_test.go
deleted file mode 100644
index 0bf04ce8..00000000
--- a/e2e/github_repo_commits_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubRepoCommits struct {
- GithubId string `json:"github_id"`
-}
-
-func TestGitHubGithubRepoCommitss(t *testing.T) {
- var repos []GithubRepoCommits
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("Select author_id from github_commits gc JOIN github_repo_commits grc ON grc.commit_sha = gc.sha where authored_date < '2021-12-25 04:40:11.000';")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var repo GithubRepoCommits
- if err := rows.Scan(&repo.GithubId); err != nil {
- panic(err)
- }
- repos = append(repos, repo)
- }
- assert.Equal(t, 1093, len(repos))
-}
diff --git a/e2e/github_repo_test.go b/e2e/github_repo_test.go
deleted file mode 100644
index 1de9609b..00000000
--- a/e2e/github_repo_test.go
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubRepo struct {
- GithubId string `json:"github_id"`
-}
-
-func TestGitHubRepos(t *testing.T) {
- var repos []GithubRepo
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- rows, err := db.Query("SELECT github_id FROM github_repos")
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var repo GithubRepo
- if err := rows.Scan(&repo.GithubId); err != nil {
- panic(err)
- }
- repos = append(repos, repo)
- }
- assert.Equal(t, 1, len(repos))
-}
diff --git a/e2e/github_users_test.go b/e2e/github_users_test.go
deleted file mode 100644
index 3e82104d..00000000
--- a/e2e/github_users_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GithubUser struct {
- Id int
-}
-
-func TestGithubUsers(t *testing.T) {
- var users []GithubUser
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM github_users"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var user GithubUser
- if err := rows.Scan(&user.Id); err != nil {
- panic(err)
- }
- users = append(users, user)
- }
- assert.Equal(t, true, len(users) > 0)
-}
diff --git a/e2e/gitlab_commits_test.go b/e2e/gitlab_commits_test.go
deleted file mode 100644
index 260aecef..00000000
--- a/e2e/gitlab_commits_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type Commit struct {
- Sha string
-}
-
-func TestGitLabCommits(t *testing.T) {
- var commits []Commit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT sha FROM gitlab_commits where authored_date < '2019-06-25 02:41:42.000'"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var commit Commit
- if err := rows.Scan(&commit.Sha); err != nil {
- panic(err)
- }
- commits = append(commits, commit)
- }
- assert.Equal(t, 2817, len(commits))
-}
diff --git a/e2e/gitlab_merge_request_commits_merge_requests_test.go b/e2e/gitlab_merge_request_commits_merge_requests_test.go
deleted file mode 100644
index 4c753ee0..00000000
--- a/e2e/gitlab_merge_request_commits_merge_requests_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type MergeRequestCommitsJoin struct {
- GitlabId string `json:"gitlab_id"`
-}
-
-func TestGitLabMergeRequestCommitsJoins(t *testing.T) {
- var mergeRequestCommitJoins []MergeRequestCommitsJoin
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "Select gitlab_id from _tool_gitlab_merge_requests mr JOIN gitlab_merge_request_commit_merge_requests mrj ON mrj.merge_request_id = mr.gitlab_id where gitlab_created_at < '2019-04-25 04:40:11.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var mergeRequestCommitJoin MergeRequestCommitsJoin
- if err := rows.Scan(&mergeRequestCommitJoin.GitlabId); err != nil {
- panic(err)
- }
- mergeRequestCommitJoins = append(mergeRequestCommitJoins, mergeRequestCommitJoin)
- }
- assert.Equal(t, 1957, len(mergeRequestCommitJoins))
-}
diff --git a/e2e/gitlab_merge_request_commits_test.go b/e2e/gitlab_merge_request_commits_test.go
deleted file mode 100644
index a5589579..00000000
--- a/e2e/gitlab_merge_request_commits_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type MergeRequestCommit struct {
- CommitId string `json:"commit_id"`
-}
-
-func TestGitLabMergeRequestCommits(t *testing.T) {
- var mergeRequestCommits []MergeRequestCommit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT commit_id FROM _tool_gitlab_merge_request_commits where authored_date < '2019-06-25 02:41:42.000'"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var mergeRequestCommit MergeRequestCommit
- if err := rows.Scan(&mergeRequestCommit.CommitId); err != nil {
- panic(err)
- }
- mergeRequestCommits = append(mergeRequestCommits, mergeRequestCommit)
- }
- assert.Equal(t, 2496, len(mergeRequestCommits))
-}
diff --git a/e2e/gitlab_merge_request_notes_test.go b/e2e/gitlab_merge_request_notes_test.go
deleted file mode 100644
index 660c9beb..00000000
--- a/e2e/gitlab_merge_request_notes_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type MergeRequestNote struct {
- GitlabId int `json:"gitlab_id"`
-}
-
-func TestGitLabMergeRequestNotes(t *testing.T) {
- var mergeRequestNotes []MergeRequestNote
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT gitlab_id FROM gitlab_merge_request_notes where gitlab_created_at < '2019-06-25 02:41:42.000'"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var mergeRequestNote MergeRequestNote
- if err := rows.Scan(&mergeRequestNote.GitlabId); err != nil {
- panic(err)
- }
- mergeRequestNotes = append(mergeRequestNotes, mergeRequestNote)
- }
- assert.Equal(t, 2835, len(mergeRequestNotes))
-}
diff --git a/e2e/gitlab_mrs_test.go b/e2e/gitlab_mrs_test.go
deleted file mode 100644
index 421c7a78..00000000
--- a/e2e/gitlab_mrs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type Mr struct {
- iid int
-}
-
-func TestGitLabMrs(t *testing.T) {
- var mrs []Mr
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT iid FROM _tool_gitlab_merge_requests where gitlab_created_at < '2019-06-25 02:41:42.000'"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var mr Mr
- if err := rows.Scan(&mr.iid); err != nil {
- panic(err)
- }
- mrs = append(mrs, mr)
- }
- assert.Equal(t, 589, len(mrs))
-}
diff --git a/e2e/gitlab_pipelines_test.go b/e2e/gitlab_pipelines_test.go
deleted file mode 100644
index c112ef06..00000000
--- a/e2e/gitlab_pipelines_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type Pipeline struct {
- GitlabId string `json:"gitlab_id"`
-}
-
-func TestGitLabPipelines(t *testing.T) {
- var pipelines []Pipeline
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT gitlab_id FROM gitlab_pipelines where gitlab_created_at < '2019-06-25 02:41:42.000'"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var pipeline Pipeline
- if err := rows.Scan(&pipeline.GitlabId); err != nil {
- panic(err)
- }
- pipelines = append(pipelines, pipeline)
- }
- assert.Equal(t, 1333, len(pipelines))
-}
diff --git a/e2e/gitlab_project_commits_test.go b/e2e/gitlab_project_commits_test.go
deleted file mode 100644
index 4378c84a..00000000
--- a/e2e/gitlab_project_commits_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type GitlabProjectCommit struct {
- Sha string
-}
-
-func TestGitlabProjectCommits(t *testing.T) {
- var commits []GitlabProjectCommit
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "Select sha from gitlab_commits co JOIN gitlab_project_commits coj ON co.sha = coj.commit_sha where authored_date < '2019-04-25 04:40:11.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var commit GitlabProjectCommit
- if err := rows.Scan(&commit.Sha); err != nil {
- panic(err)
- }
- commits = append(commits, commit)
- }
- assert.Equal(t, 1659, len(commits))
-}
diff --git a/e2e/gitlab_projects_test.go b/e2e/gitlab_projects_test.go
deleted file mode 100644
index 79250c10..00000000
--- a/e2e/gitlab_projects_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type Project struct {
- GitlabId int `json:"gitlab_id"`
-}
-
-func TestGitLabProjects(t *testing.T) {
- var projects []Project
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT gitlab_id FROM gitlab_projects"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var project Project
- if err := rows.Scan(&project.GitlabId); err != nil {
- panic(err)
- }
- projects = append(projects, project)
- }
- assert.Equal(t, 1, len(projects))
-}
diff --git a/e2e/gitlab_reviewers_test.go b/e2e/gitlab_reviewers_test.go
deleted file mode 100644
index e16b6425..00000000
--- a/e2e/gitlab_reviewers_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type Reviewer struct {
- GitlabId int `json:"gitlab_id"`
-}
-
-func TestGitLabReviewers(t *testing.T) {
- var reviewers []Reviewer
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT gitlab_id FROM gitlab_reviewers"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var reviewer Reviewer
- if err := rows.Scan(&reviewer.GitlabId); err != nil {
- panic(err)
- }
- reviewers = append(reviewers, reviewer)
- }
- assert.Equal(t, true, len(reviewers) > 0)
-}
diff --git a/e2e/gitlab_users_test.go b/e2e/gitlab_users_test.go
deleted file mode 100644
index 72afa89b..00000000
--- a/e2e/gitlab_users_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type User struct {
- Email string
-}
-
-func TestGitLabUsers(t *testing.T) {
- var users []User
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT email FROM gitlab_users"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var user User
- if err := rows.Scan(&user.Email); err != nil {
- panic(err)
- }
- users = append(users, user)
- }
- assert.Equal(t, true, len(users) > 0)
-}
diff --git a/e2e/jenkins_builds_test.go b/e2e/jenkins_builds_test.go
deleted file mode 100644
index a6399aa2..00000000
--- a/e2e/jenkins_builds_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JenkinsBuild struct {
- Id int
-}
-
-func TestJenkinsBuilds(t *testing.T) {
- var jenkinsBuilds []JenkinsBuild
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM jenkins_builds where start_time < '2021-01-27 08:34:34.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jenkinsBuild JenkinsBuild
- if err := rows.Scan(&jenkinsBuild.Id); err != nil {
- panic(err)
- }
- jenkinsBuilds = append(jenkinsBuilds, jenkinsBuild)
- }
- assert.Equal(t, 972, len(jenkinsBuilds))
-}
diff --git a/e2e/jenkins_jobs_test.go b/e2e/jenkins_jobs_test.go
deleted file mode 100644
index 42042cb8..00000000
--- a/e2e/jenkins_jobs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JenkinsJob struct {
- Id int
-}
-
-func TestJenkinsJobs(t *testing.T) {
- var jenkinsJobs []JenkinsJob
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM jenkins_jobs;"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jenkinsJob JenkinsJob
- if err := rows.Scan(&jenkinsJob.Id); err != nil {
- panic(err)
- }
- jenkinsJobs = append(jenkinsJobs, jenkinsJob)
- }
- assert.Equal(t, true, len(jenkinsJobs) > 0)
-}
diff --git a/e2e/jira_board_issues_test.go b/e2e/jira_board_issues_test.go
deleted file mode 100644
index 9c92c80a..00000000
--- a/e2e/jira_board_issues_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraBoardIssue struct {
- BoardIssueId int `json:"board_id"`
-}
-
-func TestJiraBoardIssues(t *testing.T) {
- var jiraBoardIssues []JiraBoardIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT board_id FROM lake.jira_issues ji JOIN jira_board_issues jbi ON ji.issue_id = jbi.issue_id where resolution_date < '2020-10-15 08:59:51.304';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraBoardIssue JiraBoardIssue
- if err := rows.Scan(&jiraBoardIssue.BoardIssueId); err != nil {
- panic(err)
- }
- jiraBoardIssues = append(jiraBoardIssues, jiraBoardIssue)
- }
- assert.Equal(t, 894, len(jiraBoardIssues))
-}
diff --git a/e2e/jira_board_sprints_test.go b/e2e/jira_board_sprints_test.go
deleted file mode 100644
index ded28b00..00000000
--- a/e2e/jira_board_sprints_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraBoardSprint struct {
- BoardId int `json:"board_id"`
-}
-
-func TestJiraBoardSprints(t *testing.T) {
- var jiraBoardSprints []JiraBoardSprint
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT board_id FROM lake.jira_sprints js JOIN jira_board_sprints jbs ON jbs.sprint_id = js.sprint_id WHERE start_date < '2020-12-27 01:22:00.000';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraBoardSprint JiraBoardSprint
- if err := rows.Scan(&jiraBoardSprint.BoardId); err != nil {
- panic(err)
- }
- jiraBoardSprints = append(jiraBoardSprints, jiraBoardSprint)
- }
- assert.Equal(t, 13, len(jiraBoardSprints))
-}
diff --git a/e2e/jira_boards_test.go b/e2e/jira_boards_test.go
deleted file mode 100644
index c02bcc77..00000000
--- a/e2e/jira_boards_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraBoard struct {
- BoardId int `json:"board_id"`
-}
-
-func TestJiraBoards(t *testing.T) {
- var jiraBoards []JiraBoard
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT board_id FROM jira_boards;"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraBoard JiraBoard
- if err := rows.Scan(&jiraBoard.BoardId); err != nil {
- panic(err)
- }
- jiraBoards = append(jiraBoards, jiraBoard)
- }
- assert.Equal(t, 1, len(jiraBoards))
-}
diff --git a/e2e/jira_changelog_items_test.go b/e2e/jira_changelog_items_test.go
deleted file mode 100644
index ae26585a..00000000
--- a/e2e/jira_changelog_items_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraChangelogItem struct {
- ChangelogId int `json:"changelog_id"`
-}
-
-func TestJiraChangelogItems(t *testing.T) {
- var jiraChangelogItems []JiraChangelogItem
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT jc.changelog_id FROM lake.jira_changelogs jc JOIN jira_changelog_items jci ON jci.changelog_id = jc.changelog_id where created < '2020-07-05 00:17:32.778';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraChangelogItem JiraChangelogItem
- if err := rows.Scan(&jiraChangelogItem.ChangelogId); err != nil {
- panic(err)
- }
- jiraChangelogItems = append(jiraChangelogItems, jiraChangelogItem)
- }
- assert.Equal(t, 4293, len(jiraChangelogItems))
-}
diff --git a/e2e/jira_changelogs_test.go b/e2e/jira_changelogs_test.go
deleted file mode 100644
index 15d519b2..00000000
--- a/e2e/jira_changelogs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraChangelog struct {
- ChangelogId int `json:"changelog_id"`
-}
-
-func TestJiraChangelogs(t *testing.T) {
- var jiraChangelogs []JiraChangelog
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT changelog_id FROM jira_changelogs where created < '2020-07-05 00:17:32.778';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraChangelog JiraChangelog
- if err := rows.Scan(&jiraChangelog.ChangelogId); err != nil {
- panic(err)
- }
- jiraChangelogs = append(jiraChangelogs, jiraChangelog)
- }
- assert.Equal(t, 3494, len(jiraChangelogs))
-}
diff --git a/e2e/jira_issues_test.go b/e2e/jira_issues_test.go
deleted file mode 100644
index 547ac337..00000000
--- a/e2e/jira_issues_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraIssue struct {
- IssueId int `json:"issue_id"`
-}
-
-func TestJiraIssues(t *testing.T) {
- var jiraIssues []JiraIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT issue_id FROM lake.jira_issues ji where resolution_date < '2020-06-23 10:21:23.562';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraIssue JiraIssue
- if err := rows.Scan(&jiraIssue.IssueId); err != nil {
- panic(err)
- }
- jiraIssues = append(jiraIssues, jiraIssue)
- }
- assert.Equal(t, 130, len(jiraIssues))
-}
diff --git a/e2e/jira_projects_test.go b/e2e/jira_projects_test.go
deleted file mode 100644
index dea1c0f9..00000000
--- a/e2e/jira_projects_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraProject struct {
- Id int
-}
-
-func TestJiraProjects(t *testing.T) {
- var jiraProjects []JiraProject
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT id FROM jira_projects;"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraProject JiraProject
- if err := rows.Scan(&jiraProject.Id); err != nil {
- panic(err)
- }
- jiraProjects = append(jiraProjects, jiraProject)
- }
- assert.Equal(t, true, len(jiraProjects) > 0)
-}
diff --git a/e2e/jira_remote_links_test.go b/e2e/jira_remote_links_test.go
deleted file mode 100644
index 42d000ac..00000000
--- a/e2e/jira_remote_links_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraRemoteLink struct {
- RemotelinkId string `json:"remotelink_id"`
-}
-
-func TestJiraRemoteLinks(t *testing.T) {
- var jiraRemoteLinks []JiraRemoteLink
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT remotelink_id FROM lake.jira_remotelinks rl JOIN jira_issues ji ON ji.issue_id = rl.issue_id where resolution_date < '2020-06-19 06:31:18.495';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraRemoteLink JiraRemoteLink
- if err := rows.Scan(&jiraRemoteLink.RemotelinkId); err != nil {
- panic(err)
- }
- jiraRemoteLinks = append(jiraRemoteLinks, jiraRemoteLink)
- }
- assert.Equal(t, 43, len(jiraRemoteLinks))
-}
diff --git a/e2e/jira_sprint_issues_test.go b/e2e/jira_sprint_issues_test.go
deleted file mode 100644
index 0e196346..00000000
--- a/e2e/jira_sprint_issues_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraSprintIssue struct {
- IssueId int `json:"issue_id"`
-}
-
-func TestJiraSprintIssues(t *testing.T) {
- var jiraSprintIssues []JiraSprintIssue
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT si.issue_id FROM lake.jira_sprint_issues si JOIN jira_issues ji ON ji.issue_id = si.issue_id where resolution_date < '2020-06-19 06:31:18.495';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraSprintIssue JiraSprintIssue
- if err := rows.Scan(&jiraSprintIssue.IssueId); err != nil {
- panic(err)
- }
- jiraSprintIssues = append(jiraSprintIssues, jiraSprintIssue)
- }
- assert.Equal(t, 78, len(jiraSprintIssues))
-}
diff --git a/e2e/jira_sprints_test.go b/e2e/jira_sprints_test.go
deleted file mode 100644
index 00a7d2e5..00000000
--- a/e2e/jira_sprints_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraSprint struct {
- SprintId int `json:"sprint_id"`
-}
-
-func TestJiraSprints(t *testing.T) {
- var jiraSprints []JiraSprint
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT sprint_id FROM jira_sprints where start_date < '2020-12-09 01:15:11.205';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraSprint JiraSprint
- if err := rows.Scan(&jiraSprint.SprintId); err != nil {
- panic(err)
- }
- jiraSprints = append(jiraSprints, jiraSprint)
- }
- assert.Equal(t, 12, len(jiraSprints))
-}
diff --git a/e2e/jira_users_test.go b/e2e/jira_users_test.go
deleted file mode 100644
index c8b9399f..00000000
--- a/e2e/jira_users_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraUser struct {
- Email string
-}
-
-func TestJiraUsers(t *testing.T) {
- var jiraUsers []JiraUser
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT email FROM jira_users;"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraUser JiraUser
- if err := rows.Scan(&jiraUser.Email); err != nil {
- panic(err)
- }
- jiraUsers = append(jiraUsers, jiraUser)
- }
- assert.Equal(t, true, len(jiraUsers) > 0)
-}
diff --git a/e2e/jira_worklogs_test.go b/e2e/jira_worklogs_test.go
deleted file mode 100644
index 5b39ac35..00000000
--- a/e2e/jira_worklogs_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package e2e
-
-import (
- "fmt"
- "log"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-// This test should only run once main_test is complete and ready
-
-type JiraWorklog struct {
- TimeSpent string `json:"time_spent"`
-}
-
-func TestJiraWorklogs(t *testing.T) {
- var jiraWorklogs []JiraWorklog
- db, err := InitializeDb()
- assert.Nil(t, err)
- if err != nil {
- log.Fatal(err)
- }
- sqlCommand := "SELECT time_spent FROM lake.jira_issues ji JOIN jira_worklogs jw ON ji.issue_id = jw.issue_id where resolution_date < '2020-06-19 06:31:18.495';"
- rows, err := db.Query(sqlCommand)
- if err != nil {
- fmt.Println("ERROR: ", err)
- }
- assert.Nil(t, err)
- defer rows.Close()
- for rows.Next() {
- var jiraWorklog JiraWorklog
- if err := rows.Scan(&jiraWorklog.TimeSpent); err != nil {
- panic(err)
- }
- jiraWorklogs = append(jiraWorklogs, jiraWorklog)
- }
- assert.Equal(t, 41, len(jiraWorklogs))
-}