Skip to content

Commit acd94b5

Browse files
authored
Dockerfile, tests: fix typo, add backstop (#16309)
* Dockerfile, tests: fix typo, add backstop Signed-off-by: William Woodruff <william@trailofbits.com> * formatting, comment Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com>
1 parent 6c1ffd1 commit acd94b5

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
232232
# to keep these.
233233
RUN mkdir -p /tmp/share /tmp/cache
234234
ENV XDG_DATA_HOME /tmp/share
235-
ENV XDG_CACHE_COME /tmp/cache
235+
ENV XDG_CACHE_HOME /tmp/cache
236236

237237
# Copy the directory into the container, this is done last so that changes to
238238
# Warehouse itself require the least amount of layers being invalidated from

tests/functional/test_environment.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
import platformdirs
14+
15+
16+
def test_xdg_environment():
17+
# Backstop checks for Warehouse's (Dockerfile-configured) environment.
18+
user_data = platformdirs.user_data_dir()
19+
user_cache = platformdirs.user_cache_dir()
20+
21+
assert user_data == "/tmp/share"
22+
assert user_cache == "/tmp/cache"

0 commit comments

Comments
 (0)