DEV Community

KevinSarav
KevinSarav

Posted on

Internship Updates

So far, my internship has been going well. I just completed my first Jira ticket and put it up for code review with a pull request. I've already addressed all the comments from my co workers, so I should be able to merge soon. My ticket was about adding unit tests using the cmocka framework to one function. My next ticket will be the same, except I'll be adding unit tests for the rest of the functions in the file I was working on. We aim for 100% code coverage. For a lot of this internship, I've been by myself researching and trying to tackle my problems myself.

Some challenges I faced were with working with Git. I initially had one issue where any code changes I made weren't being reflected on my unit tests. I found out that that was because my VS Code was only making changes to the files in my local machine, not the files on my Linux machine. To solve this, I added a Remote SSH extension to my VS Code so I can connect to my VM and make my code changes on there.

Another issue I faced recently was trying to remove a single white space that I added with a commit. For some reason, Bitbucket flagged a white space in the diff file, even after I already fixed it on Bitbucket. One of my co workers suggested I remove the commit. I found out that to do this, I needed to use the command git revert . However, I've been having issues trying to connect to my Bitbucket branch instead of my local branch, so whenever I reverted the commit and pushed, I could not see the change reflected on Bitbucket. To fix this, I ran the command git checkout -B because whenever I tried to access my Bitbucket branch, I get an error saying a branch already exists with that name. After doing this, reverting the commit, committing this change, and pushing, my Bitbucket finally removed the commit and the white space is no more.

Some future issues I expect to face are with these unit tests. For the most part, I've been doing the usual unit tests, but in the future, I suspect to tackle problems where I'd have to understand what the code is doing to do the unit test properly.

Top comments (0)