File tree Expand file tree Collapse file tree 3 files changed +53
-7
lines changed Expand file tree Collapse file tree 3 files changed +53
-7
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,6 @@ RUN curl -fsSL https://code-server.dev/install.sh -o install-code-server.sh \
17
17
# otherwise tsc might generate wrong paths for e2e tests
18
18
WORKDIR /atlascode
19
19
20
- RUN mkdir /mock-repository && cd /mock-repository \
21
- && git init \
22
- && git remote add origin
[email protected] /test-repository.git \
23
- && touch test.json \
24
- && cd ..
25
-
26
20
# Where our vscode, chromedriver, images etc. will go
27
21
ENV TEST_RESOURCES=/atlascode/e2e/.resources
28
22
@@ -33,6 +27,11 @@ RUN cat <<EOF > /usr/bin/entrypoint.sh && chmod +x /usr/bin/entrypoint.sh
33
27
# !/usr/bin/env bash
34
28
set -ex
35
29
30
+ # Setting up git configuration
31
+ echo "Running git setup script..."
32
+ chmod +x ./e2e/setup-mock-repository.sh
33
+ ./e2e/setup-mock-repository.sh
34
+
36
35
echo "setting up trusted certificate authorities"
37
36
cp ./e2e/sslcerts/rootCA.crt /usr/local/share/ca-certificates/atlascode_e2e_Root_CA.crt
38
37
update-ca-certificates
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ echo " Setting up global git configuration..."
5
+ git config --global user.name " Test User"
6
+ git config --global user.email
" [email protected] "
7
+ git config --global init.defaultBranch main
8
+
9
+ echo " Creating mock repository that simulates a Bitbucket clone..."
10
+ mkdir /mock-repository
11
+ cd /mock-repository
12
+
13
+ # Initialize repository
14
+ git init
15
+
16
+ # Add remote and configure it properly (like git clone does)
17
+ git remote add origin
[email protected] /test-repository.git
18
+ git config branch.main.remote origin
19
+ git config branch.main.merge refs/heads/main
20
+ git config remote.origin.fetch " +refs/heads/*:refs/remotes/origin/*"
21
+
22
+ # Create initial files
23
+ touch test.json README.md
24
+ echo " # Test Repository" > README.md
25
+ echo " {}" > test.json
26
+
27
+ # Commit files and set up tracking
28
+ git add .
29
+ git commit -m " Initial commit"
30
+ git branch -M main
31
+
32
+ # Simulate remote tracking (like after clone + fetch)
33
+ git update-ref refs/remotes/origin/main refs/heads/main
34
+
35
+ echo " Creating test branch with additional commits..."
36
+ # Create and switch to test branch
37
+ git checkout -b test-branch
38
+
39
+ # Add some changes to simulate development work
40
+ echo " Test feature implementation" >> README.md
41
+ echo ' {"name": "test-project", "version": "1.0.0"}' > test.json
42
+
43
+ # Commit the changes
44
+ git add .
45
+ git commit -m " Add test feature with script.js and updated files"
46
+
47
+ cd ..
Original file line number Diff line number Diff line change 66
66
"test:react" : " jest -c jest.react.config.ts" ,
67
67
"test:e2e:sslcerts" : " cd e2e/sslcerts && ./generate-certs.sh" ,
68
68
"test:e2e:docker" : " cd e2e && docker compose run --rm atlascode-e2e; status=$?; docker compose down; exit $status" ,
69
- "test:e2e:docker:build" : " docker build --tag atlascode-e2e - < e2e/Dockerfile" ,
69
+ "test:e2e:docker:build" : " docker build --tag atlascode-e2e -f e2e/Dockerfile . " ,
70
70
"test:e2e:docker:serve" : " cd e2e && npm run test:e2e:docker:build && export ONLYSERVER=1 && docker compose up" ,
71
71
"devcompile" : " npm run clean && npm run devcompile:react && npm run devcompile:extension" ,
72
72
"devcompile:react" : " webpack --mode development --config webpack.react.dev.js --fail-on-warnings" ,
You can’t perform that action at this time.
0 commit comments