Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] github action 테스트 #2

Closed
wants to merge 4 commits into from
Closed

Conversation

bellringstar
Copy link
Collaborator

github action에 추가해놓은 ai 코드 리뷰, pr 관리가 정상적으로 동작하는지 확인하기 위한 테스트

🚨 관련 이슈

closes #1

🌈 작업 상황

📌 기타

github action에 추가해놓은 ai 코드 리뷰, pr 관리가 정상적으로 동작하는지 확인하기 위한 테스트
@bellringstar bellringstar self-assigned this Aug 9, 2024
프로젝트 명 앞에 조직 이름 추가
@@ -14,7 +14,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: alex-page/[email protected]
with:
project: "Team2 dari"
project: "woowa-techcamp-2024/Team2 dari"
column: In Review
repo-token: ${{ secrets.GITHUB_TOKEN }}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 diff를 살펴보면 다음과 같은 변화가 있습니다:

  1. 프로젝트 이름 변경:
    • 이전: "Team2 dari"
    • 이후: "woowa-techcamp-2024/Team2 dari"

이 변경은 프로젝트의 소속된 조직이나 레포지토리를 명시적으로 보여줍니다. 일반적으로, 이는 더 구체적이고 명확한 설정으로 보입니다.

확인해야 할 점:

  • 문법: 두 가지 프로젝트 이름 모두 유효한 문자열로 보입니다.
  • 조직 및 레포지토리 존재 여부: 코드에서 참조하는 "woowa-techcamp-2024"라는 조직과 "Team2 dari"라는 프로젝트가 실제로 존재하는지 확인해야 합니다.
  • 권한 문제: repo-token이 해당 프로젝트에 대한 액세스 권한을 가지고 있는지도 검토해야 합니다.

결론적으로, 코드의 변화는 명확성을 더해주는 것으로 보이며, 실질적인 문제가 없으면 좋겠습니다.

테스트 내용을 일부러 틀리게 만들어 코드리뷰 테스트
assertTrue(str.contains("ell"));
assertFalse(str.isEmpty());
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드의 차이(diff)에서 몇 가지 혼란스러운 점과 불규칙성을 발견할 수 있습니다.

  1. 테스트 케이스 오류:

    • testAddition() 메서드에서 result를 계산할 때 1 - 1로 되어 있어 결과는 0입니다. 그러나 assertEquals(2, result);2와 비교하고 있으므로 테스트가 항상 실패합니다.

    • testSubtraction() 메서드에서도 result5 + 3으로 계산하지만, 기대값은 2로 잘못 되어 있습니다. assertEquals(2, result); 는 잘못된 결과 비교입니다.

  2. 메서드 접근 제어자:

    • 모든 테스트 메서드는 기본적으로 public 이므로, testAddition()에서 접근 제어자를 명시하지 않은 것은 불필요한 혼동을 줄 수 있습니다. 일관성을 위해 모두 public으로 선언하는 것이 좋습니다.
  3. 명확성:

    • 각 테스트에서 어떤 동작을 테스트하는지에 대한 주석이 없기 때문에, 코드의 이해도가 떨어질 수 있습니다. 각 테스트의 목적을 설명하는 주석 추가를 고려하는 것이 좋습니다.

전체적으로 테스트 메서드를 수정하여 올바른 연산을 수행하고 기대값을 수정해야 합니다. 이를 통해 코드의 정상 작동 및 명확성을 높일 수 있습니다.

@bellringstar bellringstar reopened this Aug 9, 2024
@bellringstar bellringstar reopened this Aug 9, 2024
@bellringstar bellringstar reopened this Aug 9, 2024
@bellringstar bellringstar added the 중복 This issue or pull request already exists label Aug 11, 2024
@bellringstar bellringstar changed the title test: github action 테스트 [Test] github action 테스트 Aug 11, 2024
@bellringstar bellringstar deleted the test/github-action branch August 11, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
중복 This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Test] github action 테스트
1 participant