Skip to content

Commit

Permalink
added makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhatdell committed Oct 15, 2024
1 parent 83c7272 commit 0e135de
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 5 deletions.
41 changes: 41 additions & 0 deletions test/e2e-fsgroup/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
#
# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed 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.
#
#
# Makefile for FSGroup e2e Tests

# Variables
GINKGO_BIN_PATH = /root/go/bin/ginkgo
GINKGO_INSTALL_CMD = go install github.com/onsi/ginkgo/v2/ginkgo
GINKGO_DEST_PATH = /usr/bin/ginkgo

# Default target to run all tasks
.PHONY: all
all: install-ginkgo run-tests

# Target to install Ginkgo v2, verify the installation, and move the binary
.PHONY: install-ginkgo
install-ginkgo:
@echo "Installing Ginkgo v2..."
$(GINKGO_INSTALL_CMD)
@echo "Verifying Ginkgo installation..."
$(GINKGO_BIN_PATH) version
@echo "Moving Ginkgo binary to /usr/bin..."
sudo mv $(GINKGO_BIN_PATH) $(GINKGO_DEST_PATH)

# Target to run FSGroup e2e tests
.PHONY: run-tests
run-tests:
@echo "Running FSGroup e2e tests..."
./run.sh
40 changes: 35 additions & 5 deletions test/e2e-fsgroup/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,59 @@
# FSGroup e2e Tests

## Installing Ginkgo v2
## Prerequisites
Ensure that you have Go installed on your system to install Ginkgo.

To install Ginkgo, use the following command:
## Using the Makefile

This project includes a `Makefile` to automate the installation of Ginkgo, verify its installation, and run the FSGroup e2e tests. You can use the following commands to perform these tasks:

### Install Ginkgo v2 and Run Tests

To install Ginkgo, verify the installation, move the binary to a more accessible location, and run the FSGroup tests, run:
```bash
make all
```

### Individual Makefile Targets

You can also run each step separately using the following commands:

- **Install Ginkgo v2, verify the installation, and move the binary:**
```bash
make install-ginkgo
```

- **Run FSGroup e2e tests:**
```bash
make run-tests
```

## Manual Installation Steps

If you prefer to install Ginkgo manually, follow these steps:

### Installing Ginkgo v2

To install Ginkgo, use the following command:
```bash
go install github.com/onsi/ginkgo/v2/ginkgo
```

### Verify Installation

After installation, check the Ginkgo version with:

```bash
/root/go/bin/ginkgo version
```

You should see output similar to:

```
Ginkgo Version 2.x.x
```

Move the Ginkgo binary to a more accessible location:
### Move the Ginkgo Binary

Move the Ginkgo binary to a more accessible location:
```bash
mv /root/go/bin/ginkgo /usr/bin/ginkgo
```
Expand Down

0 comments on commit 0e135de

Please sign in to comment.